在使用aspnet_compiler运行预编译时,我得到一个asp.net应用程序的空引用。没有特定的错误,但我在构建日志中有这个。
[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(VirtualDirectory sourceVdir, String destPhysicalDir, Boolean topLevel)
at System.Web.Compilation.BuildManager.CopyStaticFilesRecursive(VirtualDirectory sourceVdir, String destPhysicalDir, Boolean topLevel)
at System.Web.Compilation.BuildManager.PrecompileAppInternal(VirtualPath startingVirtualDir)
at System.Web.Compilation.BuildManager.PrecompileApp(VirtualPath startingVirtualDir)
at System.Web.Compilation.BuildManager.PrecompileApp(ClientBuildManagerCallback callback)
at System.Web.Compilation.BuildManagerHost.PrecompileApp(ClientBuildManagerCallback callback)
at System.Web.Compilation.BuildManagerHost.PrecompileApp(ClientBuildManagerCallback callback)
at System.Web.Compilation.ClientBuildManager.PrecompileApplication(ClientBuildManagerCallback callback, Boolean forceCleanBuild)
at System.Web.Compilation.ClientBuildManager.PrecompileApplication(ClientBuildManagerCallback callback)
at System.Web.Compilation.Precompiler.Main(String[] args)
到目前为止我尝试过的事情,
我正在使用以下命令行运行build
c:\windows\Microsoft.NET\Framework\v3.5\MSBuild.exe Build.xml /target:Precompile > log\Precompile.txt
这是build xml
中的目标定义 <Target Name="Precompile">
<Exec
Command=""C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler" -v Web -p E:\Src\Web -u -f -d -fixednames E:\Output -errorstack"
WorkingDirectory="."
ContinueOnError="false"/>
</Target>
到目前为止,没有任何帮助,我从一位同事那里得到了这个消息,他说前几天工作正常,我该如何解决这个问题?构建正在运行并且退出发生只有到最后,另一件事是它从视觉工作室运行正常,只有命令行构建破坏,任何指针?谢谢