Click here to Skip to main content
15,889,034 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
whenever i have start new silverlight application in visual studio 2010 it is shown system.nullrefrenceException an exception has unhandled error shown so what can i do??? plese help me its urgent.... thanks
Posted
Comments
db7uk 11-Jun-12 15:55pm    
Is the code breaking at a certain point? i.e. vs shows the code block that caused the issue? What happens if you trap nullReferenceExceptions through the execptions menu (debug > Exceptions > system > System.NullReferenceException) ????
Saeid.Babaei86 11-Jun-12 16:09pm    
your question is not clear . please improve question . i think you seen this error in design mode . is it correct ?
pandya purvang 13-Jun-12 4:58am    
yess i have seen it in design mode....plese help me its urgent my work is stable here i cant do anything.......
pandya purvang 13-Jun-12 4:52am    
yaaa i have getting this type of error in desigh view.....so what is the solution////

1 solution

NullReference Exception
This error happens when you try to use a property or call a method of an object that is null. More details: here[^]

A simple use of Visual studio DEBUGGER can tell you the object because of which it is happening. Just look at the stack trace and put a debugger on that line. Check the objects of that line and see if any one is null and you are trying to use that objects property. Handle the same.


As such, if you need to know on how Silverlight projects created, here:
MSDN: How to: Create a New Silverlight Project[^]
MSDN: Walkthrough: Creating Your First Silverlight Application[^]
MSDN: Silverlight Designer for Visual Studio 2010[^]


In case, your Silverlight designer throws this error whenever you try to access:
Install: Microsoft Silverlight 4 Tools for Visual Studio 2010[^]
Refer: Similar discussion: Designer exception System.NullReferenceException in every new silverlight project[^]
 
Share this answer
 
Comments
Espen Harlinn 12-Jun-12 8:17am    
5'ed!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900