Msbuild AspNetCompiler problem -
07-02-2009
, 11:00 AM
I'm trying to use the AspNetCompiler to publish my website through msbuild
(hope this is the best way ??).
When control shifts to PrecompileWeb, the build fails (its failing to create
types for various clients.)
See I have various solution configuration's (one for each client) which I
need to apply before build (Properties="Configuration=CLIENT_P"), depending
on which client I select.
So my question is how do I apply the
property--Properties="Configuration=CLIENT_P" to the PrecompileWeb target, so
that I dont get these errors
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="PrecompileWeb""
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
ToolsVersion="3.5">
<ItemGroup>
<ProjectReferences Include="C:\KE\main.br\KE - MAIN.sln" />
</ItemGroup>
<PropertyGroup>
<BuildRoot>C:\Inetpub\wwwroot\KE_Build\</BuildRoot>
</PropertyGroup>
<Target Name="BuildOtherProjects">
<MSBuild Projects="@(ProjectReferences)" Targets="ReBuild"
Properties="Configuration=CLIENT_P" />
</Target>
<Target Name="PrecompileWeb" DependsOnTargets="BuildOtherProjects">
<AspNetCompiler
TargetPath="c:\MyWebSite\"
VirtualPath="/MyWebSite"
Force="true"
Debug="true" />
</Target>
If I build and publish through visual studio, everthing is fine |