I thought I’d fixed my Silverlight 2 Beta 2 installation; but I had not.
I ran into the issues described here, specifically:
- Error “Object reference not set to an instance of an object” when adding a WCF service
- Silverlight app cannot see WCF services in same solution
- Error “Unable to find ‘DynamicTypeService’” when clicking the Advanced button in the Add Service Reference dialog.
- Visual Studio crashing on exit
Here’s what fixed it for me. First, I attempted to debug Visual Studio while adding a WCF service and spotted an exception related to version control. I discovered that Visual Studio was set to use Team Foundation Server as the Source Control plug-in, even though my Team Foundation Server is offline. I don’t know if the Silverlight install somehow reset this, as I thought I’d set it to None in Tools – Options – Source Control – Plug-in Selector; but I changed it back to None and that fixed the Object Reference error.
Unfortunately it did not fix the second problem. Following a tip in the thread mentioned above, I moved the file:
\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Microsoft.VisualStudio.ServicesProxy.dll
Then I uninstalled Microsoft Silverlight Tools Beta 2 for Visual Studio 2008. Then I reinstalled it (no reboot). Everything works.
The Microsoft.VisualStudio.ServicesProxy.dll is replaced with a new version.
An indicator of this problem is the size of your Silverlight Tools install in Control Panel – Programs and Features. If it is 1.14MB you may have the problem. If it is 1.17 or 1.18MB you probably do not have the problem. The size of my install increased from 1.14MB to 1.17MB on reinstall. A theory is that if the Silverlight Tools installer sees the ServicesProxy.dll, it doesn’t install some other stuff that in fact it should install.