Investors & landlords

Originally there was a business on the property. The business closed and the owners started a solar farm. The buildings are actually falling and can never be rented again. This is why it is still on the books. What do you think ... should I write out the building and recapture depreciation? I thought you have to actually sell the property before you can do this ?