Created
June 27, 2013 01:50
-
-
Save tathamoddie/5873372 to your computer and use it in GitHub Desktop.
Take all app.*.config transforms and run them, producing complete files with the same names
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<PropertyGroup> | |
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion> | |
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> | |
</PropertyGroup> | |
<UsingTask TaskName="TransformXml" AssemblyFile="$(VSToolsPath)\Web\Microsoft.Web.Publishing.Tasks.dll" /> | |
<Target Name="AfterCompile" Condition="exists('app.$(Configuration).config')"> | |
<!-- Generate transformed app config in the intermediate directory --> | |
<TransformXml Source="app.config" Destination="$(IntermediateOutputPath)$(TargetFileName).config" Transform="app.$(Configuration).config" /> | |
<!-- Force build process to use the transformed configuration file from now on. --> | |
<ItemGroup> | |
<AppConfigWithTargetPath Remove="app.config" /> | |
<AppConfigWithTargetPath Include="$(IntermediateOutputPath)$(TargetFileName).config"> | |
<TargetPath>$(TargetFileName).config</TargetPath> | |
</AppConfigWithTargetPath> | |
</ItemGroup> | |
</Target> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment