none
Problem in creating Silverlight 3 Application:Object reference not set to an instance of object.

    Question

  •  After installing Visual Studio 2008 Service Pack 1 and Silvelight 3 when I try to create Silverlight Application I get this error message:Object reference not set to an instance of object.

    Please provide a solution for this problem

    Thursday, November 26, 2009 4:40 AM

Answers

  • Hi Ashish_123,

    What do you mean by "when I try to create Silverlight Application I get this error message:Object reference not set to an instance of object" ?    Do you mean that you get the exception when you create a bland new project and run it directly or after you have done something to the project?   That's different.  The former, the easier way is to reinstall them.  The latter, please share your code here.  Besides that,  we would suggest you take a look at the video tutorial.

    Best regards,

    Jonathan

    Wednesday, December 02, 2009 9:23 PM

All replies

  • Too vague, can you offer more details/steps etc?

    Thursday, November 26, 2009 5:10 AM
  • Hi Ashish_123,

    What do you mean by "when I try to create Silverlight Application I get this error message:Object reference not set to an instance of object" ?    Do you mean that you get the exception when you create a bland new project and run it directly or after you have done something to the project?   That's different.  The former, the easier way is to reinstall them.  The latter, please share your code here.  Besides that,  we would suggest you take a look at the video tutorial.

    Best regards,

    Jonathan

    Wednesday, December 02, 2009 9:23 PM
  • Hi, I have the exact same problem. I have done a complete re-install three times now. VS2008, then SP1, then Silverlight 3 etc. The first time I didn't get the templates in the create project folder, then I got templates but nothing would happen, this time I have templates (Nav, Class etc) but I get the error "Object Reference not set to an instance of an object" and thats it.

    I have Blend 3 working fine, Silverlight seems to be installed correctly.

    I am using Vista Premium, Latest SP, .NET Framework 3.5 latest SP, VS2008 Professional latest SP.

    Any thoughts - very frustrating ..........?

    Wednesday, January 06, 2010 7:55 AM
  • I faced the same problem several times earlier. I tried lots of things & complete reinstall too. But not resolved. Then I did a complete reset of Visual Studio which resolved the problem. Do the following to reset the Visual Studio:

    Goto Visual Studio 2008 Command Prompt & enter the following commands:

                 devenv /ResetSettings

                 devenv /ResetSkipPKGS

    Restart your Visual Studio now & check whether the error still persists.

    Wednesday, January 06, 2010 10:53 PM
  • Thank you VERY much for this tip - this has resolved this problem Big Smile and now I can start the instantiation of a project ... :)

    FYI I did try the first /ResetSettings after reding the previous comments but this alone does not solve the problem the second one /ResetSkipPKGS made the difference  !

    However I did find I had another error in that it appears that the install has not put the Silverlight project templates in the correct place - C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\Silverlight -

    - but on moving them from the Silverlight\V3.0\ directory the projects will now create so I can begin :)

    FOOTNOTE::::::::

    After three days of messing around I have decided to give this up until VS2010 is stable and available, in the hope that this will have these tools already embedded and operating effectively.

    I have had so much trouble in getting this installation to work. At every step there has been some problem or other. When I finally got the tools installed I followed the simple video from Tim on getting started - for me that ended up with a mass of errors, files not found, components not available, pages cannot be downloaded messages - in fact I never actually got a clean build and deploy in the test environment - so I am not likely to let an app go live based on this.

    I am really willing to believe that either I just have missed something or there is a peculiarity in my system setup that is causing all these problems but this should have been a simple way ahead. I don't profess to be a guru in development but also I have been doing complex developments and deployments using MS tools for over 10 years including embedded and havent had such a problem.

    I wish everyone else good luck with this and hope to be back in the forum with a more positive contribution later in the year.

    Thanks for all the help from the members - truly great :)

    Saturday, January 09, 2010 11:04 AM
  • haha..u save my day :)
    Tuesday, February 02, 2010 9:02 AM
  • OMG.. .how do you invoke the command prompt in Visual Studio 2010? All i see is the intermediate window which when I enter the code nothing happens!

    Sunday, October 23, 2011 5:41 AM