Last post Apr 12, 2012 05:52 PM by medhaswi
Apr 11, 2012 03:33 PM|medhaswi|LINK
I am trying to build a website in Visual studio 2005 and receive the Error 105: Object reference not set to an instance. It doesnot provide any information about the line, file or project.
Is there a way to identify the file causing this and fixing it.
Apr 11, 2012 03:40 PM|Rion Williams|LINK
You might want to try debugging and walking through the code until the error occurs
(if that is an option). Typically it will be an object not being properly instantiated, such as a collection or object that is null.
(You may be missing a "new" keyword)
You could just set the breakpoint for the beginning of the application - unless this error is occuring within a specific event, in which case you could start there.
Another option would be to wrap large sections of the application within try-catch blocks in an attempt to narrow the source of the problem.
Apr 11, 2012 03:46 PM|medhaswi|LINK
I cannot debug it because the build itself is running into the error. And it is not providing any more information about it.
It is a huge application which is written by someone else and I am trying to trace through the application
The solution has multiple projects. The projects build are sucessful but the build of website fails.
Apr 11, 2012 03:57 PM|anas|LINK
Try to restart Visual studio and run it as administrator (right click, run as administrator). Also, try to use "Clean" or "rebuild" instead of the normal "build" action.
Apr 11, 2012 04:09 PM|medhaswi|LINK
Thank you for the replies. Running visual studio as Administrator I tried cleaning the solution and rebuilding it, but the rebuild failed with same error message "Object reference not set to an instance of an object. " It doenot give the file and project
When I check the output it shows that the 7 out of 8 projects were sucessfully build but the validation of website failed.
Apr 11, 2012 04:27 PM|anas|LINK
What will happens if you try to view some of the pages using "View in Browser" option ? do you get an error ? is the project that is cauisng this issue a website ? or a web application ? I mean does it has a project file ? can you try to close VS and clear
the asp.net temporary files which can be found under "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files" folder ?
I read somewhere that there is a similar issue in VS 2005, so if you have VS 2008, it's better to use it.You dont have to migrate your project , you can still make them use .NET 2.0.
Apr 12, 2012 10:28 AM|medhaswi|LINK
When I use the view in browser option, the pages loads without any issues. They have this code deployed. It is a VS2005 solution and the project causing the issue is a website.(Not webapplication). I tried closing the VS, clearing temporary files and rebuilding
the solution but still run into the issue.
The output in the VS2005 also gives no information. It only shows me the following message "/: Build (web): Object reference not set to an instance of an object."
Apr 12, 2012 05:52 PM|medhaswi|LINK
Thank you for your help guys.I found a solution that worked fine for me. Altering my web.config file with the following gets rid of this build error.
Thank you for your help guys.I f
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=188.8.131.52, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/> <!-- add this line below --> <remove extension=".rdlc"/> </buildProviders>