Visual Studio Gotcha's
Back coding in Visual Studio for awhile and today have slogged through two frustrating problems. Solutions are recorded to save me troubleshooting time in the future.
Problem 1: When trying to view the settings of a project (References in this case) instead see the dreaded X in a circle with the error message:
An error occurred trying to load the page.
COM object that has been separated from its underlying RCW cannot be used.
It turns out for me the answer was to uninstall the C# Source Code Analysis plugin. Found the answer on the msdn site.
Having done this I could now move on to troubleshooting problem 2 (which was the original problem of the day)
Problem 2: Changing a project created in .Net Framework 2 to 3.5 in order to use linq does not automatically add all the stuff needed to actually use linq. In my case linq to xml was what I was after and I had to make the following mods to get back to square 1.
Problem 1: When trying to view the settings of a project (References in this case) instead see the dreaded X in a circle with the error message:
An error occurred trying to load the page.
COM object that has been separated from its underlying RCW cannot be used.
It turns out for me the answer was to uninstall the C# Source Code Analysis plugin. Found the answer on the msdn site.
Having done this I could now move on to troubleshooting problem 2 (which was the original problem of the day)
Problem 2: Changing a project created in .Net Framework 2 to 3.5 in order to use linq does not automatically add all the stuff needed to actually use linq. In my case linq to xml was what I was after and I had to make the following mods to get back to square 1.
- First (obviously) from the compile tab select Advanced Compile Options and change the framework version. The application will have to close and reopen.
- From the references tab add additional references you might need - for me it was system.xml.linq
- From the references tab check the additional imported namespaces you will need. For me they were system.collections.generic, system.linq and system.xml.linq
- After I did all that my vars were not automatically inferring their types - turns out there is a setting on the Compile tab appropriately named Option infer that must be turned on.
Comments