Reputation: 74527
When you precompile a directory that doesn't contain a web.config
, the aspnet_compiler.exe
defaults to CompilerVersion
2.0 and 3.5 code fails to compile. Is the following minimal web.config
the only way to specify the CompilerVersion
?
<?xml version="1.0"?>
<configuration>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4"
type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
</compilers>
</system.codedom>
</configuration>
We integrated asp.net precompilation with our build and integration environments and don't use web.config
s for our control library components
Upvotes: 2
Views: 3859
Reputation: 14722
Here you can find its parameters. Also note that ASP.NET Compilation tool is not available with versions of ASP.NET earlier than ASP.NET version 2.0.
For .NET 2.0 these are the steps you need to do
I think that for other versions of .NET you have to cd to corresponding directory.
Also read this. You might find it useful.
Upvotes: 2