Monday, December 1, 2008

Error CS0570 '<propertyname>' is not supported by the language

I ran into this error today and was able to resolve it. Hopefully I can save someone else some trouble.

In a solution, I have a web project in C# that references a C# project called BusinessComponents. I had replaced some .dll files in the BusinessComponents project with newer versions without updating the references. Then, I tried to access a new property called PseudoFamily in the dlls from the web project. It exploded, saying:
'MSU.Radiology.CIS.ServiceLayer.FamilyManager.PseudoFamily' is not supported by the language

...and I found a message in VS's Output pane that said (I shortened it a bit):
Reference to type '...PseudoFamily' claims it is defined in 'c:\...BusinessLogic.DLL', but it could not be found.

Removing and re-adding the references from the BusinessComponents project to the .dll files fixed the issue.

(I should have guessed... in following with Microsoft's long tradition of 'restart to fix it')

No comments: