I have a Web Site project in Visual Studio which works fine when running on my ASP.NET Development Server, but when I precompile/publish it with "Allow this precompiled site to be updateable" selected, it fails during publishing with error:
Error 1 Object reference not set to an instance of an object.
The error message does not give any file information or line number. The files have been precompiled by this point, but they don't get published. From what I've read, I am probably missing an assembly. This started happening suddenly this week and had
never happened before. The only extra library packages I'm using are AjaxControlToolkit and Razor, and I've placed them in my Web Site's Bin folder, as always. When this problem started happening, I tried clearing out the Bin folder, and using the "Add Library
Package Reference" tool to manage/install those libraries, but I get the same error.
The problem goes away when I precompile/publish with "Allow this precompiled site to be updateable" deselected, but that is not a solution for me. I've always followed a cookbook approach with installing Ajax & Razor to my projects, so I don't have a deep
understanding of assemblies, but I've never had this problem before.
This problem is occuring with VS2010 SP1. I tried reapplying SP1, which did not help. I then uninstalled VS2010, reinstalled it, and applied SP1 and all updates, which did not help.
I then installed VS2010 SP1 on a spare computer (exactly the same model and OS, Windows 7), and using the exact same set of website files, I did not have this problem on that computer; therefore, the problem is computer-specific.
It is very frustrating that the error provides no clues. Any ideas how I can better troubleshoot this?
I have no third-party add-ins / plugins. I have three extensions installed: NuGet Package Manager, MySQL Tools for Visual Studio, PHP Tools for Visual Studio. I have two packages installed: AjaxControlToolkit (v.4.1.60919), Microsoft ASP.NET Razor 2.
I've tried installing them manually, and using NuGet Package Manager with the same results.
I then installed VS2010 SP1 on a spare computer (exactly the same model and OS, Windows 7), and using the exact same set of website files, I did not have this problem on that computer; therefore, the problem is computer-specific.
As you said it is a problem of computer-specific, so we can hardly guess which is the root of this problem.
Kind regards
Please mark the replies as answers if they help or unmark if not.
Feedback to us
That is true, and thank you anyway for your attention. I was hoping that perhaps someone on this forum has already encountered this problem, and/or would be able to provide some advice on getting better troubleshooting information from Visual Studio. Currently,
I receive the "object reference" error message, but it gives no information on which object is causing the problem. It seems there should be a way to know which object is causing the problem.
ckc
Member
25 Points
64 Posts
Object reference not set to an instance of an object -- no file/line# given -- when Publishing We...
Nov 30, 2012 06:46 AM|LINK
I have a Web Site project in Visual Studio which works fine when running on my ASP.NET Development Server, but when I precompile/publish it with "Allow this precompiled site to be updateable" selected, it fails during publishing with error:
Error 1 Object reference not set to an instance of an object.
The error message does not give any file information or line number. The files have been precompiled by this point, but they don't get published. From what I've read, I am probably missing an assembly. This started happening suddenly this week and had never happened before. The only extra library packages I'm using are AjaxControlToolkit and Razor, and I've placed them in my Web Site's Bin folder, as always. When this problem started happening, I tried clearing out the Bin folder, and using the "Add Library Package Reference" tool to manage/install those libraries, but I get the same error.
The problem goes away when I precompile/publish with "Allow this precompiled site to be updateable" deselected, but that is not a solution for me. I've always followed a cookbook approach with installing Ajax & Razor to my projects, so I don't have a deep understanding of assemblies, but I've never had this problem before.
Can anyone help?
ckc
Member
25 Points
64 Posts
Re: Object reference not set to an instance of an object -- no file/line# given -- when Publishin...
Dec 03, 2012 04:49 AM|LINK
This problem is occuring with VS2010 SP1. I tried reapplying SP1, which did not help. I then uninstalled VS2010, reinstalled it, and applied SP1 and all updates, which did not help.
I then installed VS2010 SP1 on a spare computer (exactly the same model and OS, Windows 7), and using the exact same set of website files, I did not have this problem on that computer; therefore, the problem is computer-specific.
It is very frustrating that the error provides no clues. Any ideas how I can better troubleshoot this?
Angie xu - M...
All-Star
18664 Points
1590 Posts
Microsoft
Re: Object reference not set to an instance of an object -- no file/line# given -- when Publishin...
Dec 04, 2012 02:13 AM|LINK
Hi
Please check whether you install some third-party plugins
Kind regards
Feedback to us
Develop and promote your apps in Windows Store
ckc
Member
25 Points
64 Posts
Re: Object reference not set to an instance of an object -- no file/line# given -- when Publishin...
Dec 04, 2012 06:51 AM|LINK
Hello,
I have no third-party add-ins / plugins. I have three extensions installed: NuGet Package Manager, MySQL Tools for Visual Studio, PHP Tools for Visual Studio. I have two packages installed: AjaxControlToolkit (v.4.1.60919), Microsoft ASP.NET Razor 2. I've tried installing them manually, and using NuGet Package Manager with the same results.
Angie xu - M...
All-Star
18664 Points
1590 Posts
Microsoft
Re: Object reference not set to an instance of an object -- no file/line# given -- when Publishin...
Dec 06, 2012 02:32 AM|LINK
Hi
As you said it is a problem of computer-specific, so we can hardly guess which is the root of this problem.
Kind regards
Feedback to us
Develop and promote your apps in Windows Store
ckc
Member
25 Points
64 Posts
Re: Object reference not set to an instance of an object -- no file/line# given -- when Publishin...
Dec 06, 2012 05:16 PM|LINK
That is true, and thank you anyway for your attention. I was hoping that perhaps someone on this forum has already encountered this problem, and/or would be able to provide some advice on getting better troubleshooting information from Visual Studio. Currently, I receive the "object reference" error message, but it gives no information on which object is causing the problem. It seems there should be a way to know which object is causing the problem.