Unless, of course, it isn't the tenant's responsibility to bring their rented property up to code.
If long term rentals of property owned by the Crown Estates requires the tenant to pay for a new roof or other structural repairs, they must have a lot of rental units standing empty.
And it's interesting that we haven't heard of any other royal paying for these kinds of repairs.
108