example on command line that i use to exclude Admin
path with -x
C:\Users\Test>C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v /Application.Web -p D:\Application.Web -x /Application.Web/Admin
after run this result is fine. But when i translate to csproj
scripts.
from lib https://msdn.microsoft.com/en-us/library/ms164291.aspx
It does not parameter to exclude path from precompilation.
Currently command on csproj file
<Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
<AspNetCompiler VirtualPath="Application.Web" PhysicalPath="$(WebProjectOutputDir)" />
</Target>
<Target Name="AfterBuild">
<RemoveDir Directories="$(BaseIntermediateOutputPath)" />
</Target>