publishing asp.net website give "Object reference not set to an instance of an object." error
Posted
by Johan
on Stack Overflow
See other posts from Stack Overflow
or by Johan
Published on 2010-02-18T14:07:56Z
Indexed on
2010/03/11
18:54 UTC
Read the original article
Hit count: 795
Good day
I am using VS 2008
I am getting fed up with this error. I have search all over the web and tried every possible suggestion to this error I could find. 1. delete app_code, build, add files back, publish. (did not work) 2. delete temporary asp.net files (did not work)
in the end I even tried the command line and get the following stacktrace.
error ASPRUNTIME: Object reference not set to an instance of an object.
[NullReferenceException]: Object reference not set to an instance of an object. at System.Web.Compilation.BuildManager.CopyPrecompiledFile(VirtualFile vfile, String destPhysicalPath) at System.Web.Compilation.BuildManager.CopyStaticFilesRecursive(VirtualDirect ory sourceVdir, String destPhysicalDir, Boolean topLevel) at System.Web.Compilation.BuildManager.CopyStaticFilesRecursive(VirtualDirect ory sourceVdir, String destPhysicalDir, Boolean topLevel) at System.Web.Compilation.BuildManager.CopyStaticFilesRecursive(VirtualDirect ory sourceVdir, String destPhysicalDir, Boolean topLevel) at System.Web.Compilation.BuildManager.PrecompileAppInternal(VirtualPath star tingVirtualDir) at System.Web.Compilation.BuildManager.PrecompileApp(VirtualPath startingVirt ualDir) at System.Web.Compilation.BuildManager.PrecompileApp(ClientBuildManagerCallba ck callback) at System.Web.Compilation.BuildManagerHost.PrecompileApp(ClientBuildManagerCa llback callback) at System.Web.Compilation.BuildManagerHost.PrecompileApp(ClientBuildManagerCa llback callback) at System.Web.Compilation.ClientBuildManager.PrecompileApplication(ClientBuil dManagerCallback callback, Boolean forceCleanBuild) at System.Web.Compilation.ClientBuildManager.PrecompileApplication(ClientBuil dManagerCallback callback) at System.Web.Compilation.Precompiler.Main(String[] args)
I used the following command line: aspnet_compiler.exe -p d:\code\websites\brokerweb -v / d:\code\websites\published -f -c -errorstack -u
Please help as I cannot publish this site at all at present and it worked fine for quite a long time now before this stupid error.
Regards Johan
© Stack Overflow or respective owner