If you install Visual Studio 2008 Service Pack or .NET 3.5 Service Pack, then the Silverlight Projects may not be working properly. Even at times when you uninstall all versions of silverlight and then reinstall the latest SL RTM version your VS2008 does’nt seem to work as expected especially while creating SL projects and executing them. Its high time I had been receiving this myself and I thought I should just blog it myself so that it could be helpful for others who face the similar scenario.

Problems:
When you create a new silverlight project you get a message “Object reference not set to a instance of an object” When you try to load existing project it tells that visual studio can not open this type of project.

Solution1:

  1. Open the command prompt and go to the folder

    C:\ProgramFiles\MicrosoftVisualStudio9.0\Common7\IDE

    Or You can just go to the Visual Studio Command Prompt


  2. type devenv /resetskippkgs
  3. close the Visual Studio Window that will open after completion of previous command.
  4. type devenv /setup
    (This is optional as it worked for me by just doing step2,3)
  5. After the execution of previous command is complete open Visual Studio.

Reinstalling All the Silverlight SDK’s:

Even if the above doesn’t work try to keep binging for similar scenario’s before you finally try uninstalling all Silverlight related stuff (SDK’s, Silverlight tools, Silverlight plugin’s etc.) and then re-install them back in order from http://silverlight.net/getstarted/default.aspx

Or to be more specific

http://www.microsoft.com/silverlight/resources/technical-resources/default.aspx

 

 

 

Advertisements