Silverlight 2, Visual Studio 2008 - "Object reference not set an instance of an object error"

After installing the latest SL 2 bits as well as the SL 2 Templates for Visual Studio 2008, when you create a new Silverlight Application, you might receive the error "object reference not set an instance of an object".  You might also receive the error "This type of project is not supported in this installtion" error.

This can happen basically if you have the SL 2 Beta 2 templates for VS 2008 or the Beta 1 templates.  In my case I removed the Beta 2 bits but I still received the error while trying to create a new Silvelright Application.

The resolution for that was to run the devenv /resetskippkgs from the command prompt.

Brad has an excellent post covering the common errors you might encounter when creating a Silverlight project using Visual Studio 2008.  Though most of them are refering to the SL 2 Beta 2 bits, they hold good for the RTM Bits as well.

Cheers !!!

Print | posted on Thursday, October 16, 2008 2:20 PM

Comments on this post

# re: Silverlight 2, Visual Studio 2008 - "Object reference not set an instance of an object error"

Requesting Gravatar...
Hi,
I deleted all installations connected with SL 2.0 Beta 2 and I had no problems with version SL 2.0 RTW.. so I think that this is the easiest way ;)

btw. you wrote "...for the RTM Bits as well." .. this is RTW version (I know, this is only one letter :P )

Best Regards,
Jacek Ciereszko
Left by Jacek Ciereszko on Oct 17, 2008 4:38 AM

# re: Silverlight 2, Visual Studio 2008 - "Object reference not set an instance of an object error"

Requesting Gravatar...
Thanx a lot.I was facing thid problem from past many days..
Left by Anu on Nov 06, 2008 11:01 AM

# re: Silverlight 2, Visual Studio 2008 - "Object reference not set an instance of an object error"

Requesting Gravatar...
Thanks! That did the trick. Also, FYI: I couldn't install the Silverlight 2 Tools for Visual Studio 8 SP1 on Vista. My workaround was to manually install the Silverlight 2 SDK, then run the SL tools installer again. This worked.

Charlie
http://www.NoonmarkAntiques.com
Left by Charlie on Nov 09, 2008 4:47 AM

# re: Silverlight 2, Visual Studio 2008 - "Object reference not set an instance of an object error"

Requesting Gravatar...
thnx, so simple, so useful.
Left by igor on Dec 13, 2008 3:01 AM

# re: Silverlight 2, Visual Studio 2008 - "Object reference not set an instance of an object error"

Requesting Gravatar...
i have run command devenv /resetskippkgs but still same eror :(
Left by Asim Sajjad on Dec 17, 2008 1:55 PM

# re: Silverlight 2, Visual Studio 2008 - "Object reference not set an instance of an object error"

Requesting Gravatar...
Worked beautifully, Thanks!!
Left by briangreunke on Jan 17, 2009 12:36 AM

# re: Silverlight 2, Visual Studio 2008 - "Object reference not set an instance of an object error"

Requesting Gravatar...
I had the same error and I ended up re-installing VS 2008 SP1, Silverlight Tools but nothing changed.

devenv /resetskippkgs definitely worked for me.
Left by chirdeep on Jan 17, 2009 5:19 PM

# re: Silverlight 2, Visual Studio 2008 - "Object reference not set an instance of an object error"

Requesting Gravatar...
I ran devenv /resetskippkgs and it now works like a charm - thanks.
Left by Christopher on Feb 03, 2009 8:42 PM

# re: Silverlight 2, Visual Studio 2008 - "Object reference not set an instance of an object error"

Requesting Gravatar...
It worked fine 4 me.
I want tutorials for silverlight can u send me.. ... ... ...
Left by Amiya on Mar 25, 2009 12:15 PM

# re: Silverlight 2, Visual Studio 2008 - "Object reference not set an instance of an object error"

Requesting Gravatar...
Works excellently!!!
Thank you :)
Left by hvedir on Mar 26, 2009 9:52 PM

# re: Silverlight 2, Visual Studio 2008 - "Object reference not set an instance of an object error"

Requesting Gravatar...
Worked beautifully, Thanks!!
Left by hedayati on Oct 03, 2009 9:24 PM

# re: Silverlight 2, Visual Studio 2008 - "Object reference not set an instance of an object error"

Requesting Gravatar...
It works Perfectly, one second I coudn't & the next one, it was magicly fixed, Grate Tip, Thank U very much.
Left by Andres on Oct 30, 2009 2:55 AM

# re: Silverlight 2, Visual Studio 2008 - "Object reference not set an instance of an object error"

Requesting Gravatar...
"devenv /resetskippkgs" It's really helpful.Its saved my 4-5 hours.
Left by Sreejith on Nov 09, 2009 10:37 PM

# re: Silverlight 2, Visual Studio 2008 - "Object reference not set an instance of an object error"

Requesting Gravatar...
Thanks! I was having the same problem with Silverlight 3 toolkit and running devenv /resetskippkgs helped me!
Left by Lilia on Jan 01, 2010 5:48 AM

# re: Silverlight 2, Visual Studio 2008 - "Object reference not set an instance of an object error"

Requesting Gravatar...
thanks a lot its working for me with thte single command
Left by lucky on Apr 16, 2010 8:45 PM

# re: Silverlight 2, Visual Studio 2008 - "Object reference not set an instance of an object error"

Requesting Gravatar...
This is good only if you limited number of scripts
Left by meksika biberi zayiflama hapi on Jun 01, 2010 12:33 AM

# re: Silverlight 2, Visual Studio 2008 - "Object reference not set an instance of an object error"

Requesting Gravatar...



This is good only if you limited number of scripts
Left by meksika biberi zayiflama hapi on Jun 01, 2010 12:33 AM

# re: Silverlight 2, Visual Studio 2008 - "Object reference not set an instance of an object error"

Requesting Gravatar...
Thanks my friend, you helped me a lot
Left by Mynor on Aug 02, 2010 5:51 AM

# re: Silverlight 2, Visual Studio 2008 - "Object reference not set an instance of an object error"

Requesting Gravatar...
Thanks my friend, you helped me a lot
Left by تسريحات 2011 on Oct 31, 2010 11:24 PM

Your comment:

 (will show your gravatar)