I am trying to use the AspNetCompiler task in a custom msbuild file to precompile the asp.net 4.0 website. However, when I run:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe custom.msbuild /t:PrecompileWeb
It uses the aspnet_compiler v2.0.50727 file. Is there a way to get it to use aspnet_compiler v4.0.30319? The reason I ask is because I get this error:
ASPCONFIG: Unrecognized configuration section system.web.extensions.
However, if I run:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -p .\My.Web.Site -f .\.PRECOMPILATION -v /
It works fine, which makes sense because I use system.web.extensions in the web.config file, and 2.0 aspnet_compiler does not know what it is.
smoak source
share