Hi colleagues,
I'm trying to make my deployment configuration more flexible. For that target I want to have different deployment configurations for different deploy modes. For debug, I want to have configuration for my local machine, but for release I want to have configuration
as for remote server.
Before this changes, I had the Property group with custom variable:
<PropertyGroup>
<Var1>..\</Var1>
</PropertyGroup>
and that variable had been successfully used as physical path for my iis web services configuration for deploying.
But then I changed that configuration to have ability to configure different web services paths on my local(for Debug mode) and remote(for Release mode) machines.
I tried several ways:
1. I appended the conditions for root of property group:
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<Var1>..\..\..\</Var1>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<Var1>..\</Var1>
</PropertyGroup>
2. Also, I tried to append the conditions to inner nodes:
<PropertyGroup >
<Var1 Condition="'$(Configuration)' == 'Debug'">..\..\..\</Var1>
<Var1 Condition="'$(Configuration)' == 'Release'">..\</Var1>
</PropertyGroup>
Both of that ways work strangely.
For example, I saw the variable value in the end of msi.exe name when I added my $(Var1) variable as ending to msiname.
But when I used that variable as part of iis services(code are below) configuration, I didn't get value of variable during deployment, because I saw empty text in build log (there is only Service1.svc without ..\ for release mode) by unrecognized reason.
<VDirList Include="*">
<Vdir>Service1</Vdir>
<Physdir>$(Var1)Service1</Physdir>
<AppPool>$(WcfAppPoolName)</AppPool>
<AppPoolNetVersion>$(WcfAppPoolVersion)</AppPoolNetVersion>
</VDirList>
Has anybody faced with it or have ideas?
Thanks.