I want to delete some image resources depending on what build I'm releasing using MsDeploy. I have three builds for different clients which are basicly another theme and a lot of configuration transforms to setup their environments correctly.
I don´t want to include the image resources for client1 when deploying to client2.
Been using this as a reference for making my first stumbling steps into customizing msdeploy and it works good but I have no idea what variable to get the configuration name.
In pseudo code:
if $configurationName == "client1"
exclude dirs gfx/client2 and gfx/client3
if $configurationName == "client2"
exclude dirs gfx/client1, gfx/client3
and so on...
May be its even possible to exclude all and then include just the one which is needed?
I have posted an entry on my blog about this at http://sedodream.com/2010/08/15/WebDeploymentToolMSDeployHowToExcludeFilesFromPackageBasedOnConfiguration.aspx. Here is the summary:
You use the same approach as in my previous answer, ExcludeFromPackageFiles but you just put a condition on it. So if you have files under scripts folder with 'debug' in the file name that you want to exclude from any package which not built under debug configuration the way you do it is
<ItemGroup Condition=" '$(Configuration)'!='Debug' ">
<ExcludeFromPackageFiles Include="scripts\**\*debug*" />
</ItemGroup>
More details on my blog, but its a simple mod to the previous approach.