我厌倦了这个错误。我在网上搜索并尝试了我能找到的这个错误的所有可能建议。
- 删除 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, 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)
我使用了以下命令行:
aspnet_compiler.exe -p d:\code\websites\brokerweb -v / d:\code\websites\published -f -c -errorstack -u