Without going to the county building department and asking you will never have a solution to your (potential) problem.
Things to think about:
Had a permit been pulled on the original structure and not finalized? If so you may be able to get it "finaled" by bringing it up to code. I did this for a client in Los Altos on a swimming pool that was not "finaled" but had a open yet expired permit.. He had to add some electrical upgrades for safety purposes but otherwise it was minimal. Note: on this project, the house was within all of the setback requirements at the time as well as current setback requirements.
Second option - see if you could get a variance for the project. I would check out the variance requirements for the county.
Third option - Is the property large enough to have a secondary structure built on it? If so and you want to add value to the property, you could tear down the original structure and add a new structure that meets all of today's building codes. This might be the most risky and expensive option.
Fourth option - tear the structure down and improve the landscaping for resale.
Lastly, you could sell the property without doing anything to the structure and let the new buyer deal with it. Note: if the structure is non-compliant (non-permitted), you must disclose this to any and all potential home buyers. Otherwise you will likely be sued.
Without being able to see the project and how it sits on the lot, these are the best options that I have for you. If you would like me to take a look at the project, I can be reached at 650 917-4250.
Coldwell Banker - Downtown Los Altos Office