ENOfficial
Shahib bin Bashir narrated from Anas bin Malik that the Messenger of Allah (s.a.w) said: "All expenditures are in Allah's Cause, except for buildings, for there is no good in it."
Source: sunnah.com
Other translations
Arabic
حَدَّثَنَا مُحَمَّدُ بْنُ حُمَيْدٍ الرَّازِيُّ، حَدَّثَنَا زَافِرُ بْنُ سُلَيْمَانَ، عَنْ إِسْرَائِيلَ، عَنْ شَبِيبِ بْنِ بَشِيرٍ، عَنْ أَنَسِ بْنِ مَالِكٍ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " النَّفَقَةُ كُلُّهَا فِي سَبِيلِ اللَّهِ إِلاَّ الْبِنَاءَ فَلاَ خَيْرَ فِيهِ " . قَالَ أَبُو عِيسَى هَذَا حَدِيثٌ غَرِيبٌ . هَكَذَا قَالَ مُحَمَّدُ بْنُ حُمَيْدٍ شَبِيبُ بْنُ بَشِيرٍ وَإِنَّمَا هُوَ شَبِيبُ بْنُ بِشْرٍ .
sunnah.com