I'm getting a null reference for an asp.net application while running precompile using aspnet_compiler. There's no specific error however i have this in the build log.
[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)
Things i've tried so far,
- Clearing temp
- Assigning permissions to folders
- Checked for folder compression
- Checked for *.compiled files in bin
- Deleted *.ddl refresh dlls in bin
I'm running build from command line with the following,
c:\windows\Microsoft.NET\Framework\v3.5\MSBuild.exe Build.xml /target:Precompile > log\Precompile.txt
This is the target definition in the 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>
So far nothing has helped, i've taken this up from a colleague who says it was working fine the other day, how do i go about troubleshooting this? Build is running and the exit happens only towards the end, another thing is its running ok from visual studio, only the command line build is breaking, any pointers ? thanks