I'm having trouble with precompiling an ASP.NET MVC application. Here's the <AspNetCompiler>
task in my project's csproj file:
<AspNetCompiler Clean="true"
FixedNames="true"
Updateable="false"
VirtualPath="/"
PhysicalPath="$(ProjectDir)"
TargetPath="$(ProjectDir)..\PreCompiledOutput" />
Everything except the precompiled dlls ends up in the target path. The precompiled dlls themselves are created in the Temporary ASP.NET Files directory.
This is a problem because the next MSBuild task in this project's build is to run aspnet_merge on the precompiled dlls. As they're not in the target path aspnet_merge complains it "cannot find any assemblies that can be merged in the application bin folder".
FWIW I've tried creating a new ASP.NET MVC application and using the above <AspNetCompiler>
task in that project, and I get the same behaviour i.e. everything except the precompiled dlls ends up in the target path. Therefore it doesn't appear to be anything project specific that's causing the problem. However, if I remove the <AspNetCompiler>
task and instead setup a publish profile configured to precompile the application, the precompiled dlls do end up in the target path.
Has anyone seen anything like this before? Is there something I'm missing from the <AspNetCompiler>
task?
Well, it turns out this was caused by McAfee anti-virus
I disabled the on-access virus scanning, ran aspnet_compiler
, and everything worked as it should.