: - scirpt aspnet_compiler, (Release-mode-) -, , , . MsBuild, .
- ASP.NET . , Visual Studio.
cc.net msbuild-scirpt:
<msbuild>
<executable>C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe</executable>
<workingDirectory>C:\cc\test\code\</workingDirectory>
<projectFile>C:\Program Files\CruiseControl.NET\server\AspNetCompilerConfiguration.xml</projectFile>
<logger>C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
<buildArgs>/p:Configuration=Debug;MyAttribute1=MyValue1;MyAttribute2=MyValue2;</buildArgs>
<targets>Build;Analyze</targets>
</msbuild>
AspNetCompilerConfiguration.xml( , , - MyWebSites.msbuild), :
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" name = "AspNetPreCompile" DefaultTargets = "PrecompileWeb">
<PropertyGroup Condition="'$(MyAttribute1)' == MyValue1" >
<MySolution>c:\mything.sln</MySolution>
</PropertyGroup>
<PropertyGroup Condition="'$(MyAttribute1)' != MyValue1" >
<MySolution>c:\some_other.sln</MySolution>
</PropertyGroup>
<Target Name="Build">
<Exec Command="echo hello world 1!"/>
<MSBuild Projects="$(MySolution)" Targets="Rebuild" ContinueOnError="false" StopOnFirstFailure="false" />
</Target>
<Target Name="Analyze">
<Exec Command="echo hello world 2!"/>
</Target>
<Target Name="PrecompileWeb">
<CallTarget Targets="Build" />
<CallTarget Targets="Analyze" Condition="'$(MyAttribute2)' != 'MyValue2'" />
</Target>
</Project>
.sln Visual Studio Notepad. , - :
Project("{ABCD1234-7377-472B-9ABA-BC803B73C123}") = "MyWebSite", "http://localhost/MyWebSite", "{12345678-5FD6-4177-B210-54045B098ABC}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.VirtualPath = "/MyWebSite"
Debug.AspNetCompiler.PhysicalPath = "..\..\MyWebSite\"
Debug.AspNetCompiler.TargetPath = "C:\MyPublishedWebsite\"
Debug.AspNetCompiler.Updateable = "false"
Debug.AspNetCompiler.ForceOverwrite = "true"
...
. IIS. ( Web.Config(Release/Debug ..) , , - msbuild-Target, .)
, !