Who pays
Who pays is set by your sale contract, and it is negotiable. In practice, buyers usually expect the seller to pay an approved assessment or credit it at closing. Many states require sellers to disclose known assessments.
How it affects your sale
A big unfunded repair can affect whether buyers can get a mortgage in your building, which can reduce the number of buyers and the price. Once the work is funded and done, that often improves.
Your options
Pay the assessment and sell at full price. Credit the buyer at closing. Or sell to a cash buyer who takes on the assessment, usually at a discount. Run the numbers for each before you list.
General information, not legal advice. Rules vary by state and by your governing documents.