views:

524

answers:

1

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

+1  A: 

I had the same problem. There were no errors except when I published. I found a suggestion to delete the bin folder contents. IT WORKED!

http://www.integrationpractices.com/post/2010/02/17/Publication-(web)-Object-reference-not-set-to-an-instance-of-an-object.aspx

Helena