我厌倦了这个错误.我在网上搜索并尝试了所有可能的建议,我可以找到这个错误.
>删除app_code,构建,添加文件,发布. (不工作)
>删除临时的asp.net文件(不起作用)
最后,我甚至尝试了命令行并获得以下堆栈跟踪.
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,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)
我使用以下命令行:
aspnet_compiler.exe -p d:\code\websites\brokerweb -v / d:\code\websites\published -f -c -errorstack -u