I'm receiving the below error, when I'm trying to build a solution file through CruiseControl and MSBuild version 4
ASPNETCOMPILER : error ASPRUNTIME: The precompilation target directory
Where does it come from and how to avoid it?
I'm receiving the below error, when I'm trying to build a solution file through CruiseControl and MSBuild version 4
ASPNETCOMPILER : error ASPRUNTIME: The precompilation target directory
Where does it come from and how to avoid it?
You need to double check the precompilation directory location.
You need either:
ASPNETCOMPILER
: error ASPRUNTIME
: Target Directory not empty")Debug.AspNetCompiler.TargetPath
or Release.AspNetCompiler.TargetPath
in the solution file) is writable (for instance, you cannot write in the root directory of a dynamic view in ClearCase: M:\MyView
)As illustrated in "Trying to Build and Publish Asp.net website from command line using aspnet_compiler", the error message is usually more complete, similar to:
Error: error ASPRUNTIME: The precompilation target directory
(c:\Inetpub\wwwroot\WebsiteOne)
cannot be in the same tree as the source application directory
(c:\inetpub\wwwroot\WebsiteOne).
From the blog post "Getting Started with CruiseControl.NET":
For web solutions, update the
TargetPath
for theDebug
and/orRelease
build of the application to be outside of the source application directory.
Otherwise, you will receive the following error:
ASPNETCOMPILER : error ASPRUNTIME: The precompilation target directory cannot be in the same tree as the source application directory.
This can be done by modifying the following in the solution file:
Debug.AspNetCompiler.TargetPath = “c:\ccnet\PrecompiledWeb\SampleWeb\”
Release.AspNetCompiler.TargetPath = “c:\ccnet\PrecompiledWeb\SampleWeb\”
Alternative, one may update the Output location found in the application MSBuild properties.
You may be wondering why an updated solution won’t be updated with the next scheduled build. As it works out (and makes sense) only changes which are applied to source control are pulled onto the build box.
I have resolved the issue by below changes:
Debug.AspNetCompiler.TargetPath = “c:\ccnet\PrecompiledWeb\SampleWeb\”
Release.AspNetCompiler.TargetPath = “c:\ccnet\PrecompiledWeb\SampleWeb\”
Right click on Project in Solution Explorer Select Property Page Select MSBuild Options on the left hand side of dialog box Change path of OutputFolder - Make sure your path doesn't fall under same path tree