-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapplytransform.targets
More file actions
19 lines (17 loc) · 990 Bytes
/
applytransform.targets
File metadata and controls
19 lines (17 loc) · 990 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<Project ToolsVersion="14.0" DefaultTargets="ApplyTransform" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask TaskName="TransformXml" AssemblyFile="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(MSBuildToolsVersion)\Web\Microsoft.Web.Publishing.Tasks.dll" />
<Target Name="ApplyTransform">
<ItemGroup>
<Transform Include="$(TransformFile)" />
<ConfigsToTransform Include="$(FileToTransform)" Condition="Exists(@(Transform))">
<TransformPath>%(Transform.Identity)</TransformPath>
</ConfigsToTransform>
</ItemGroup>
<Message Text="@(ConfigsToTransform)"></Message>
<Message Text="@(Transform)"></Message>
<TransformXml Source="$(WebConfigToTransform)\%(ConfigsToTransform.Identity)"
Transform="%(ConfigsToTransform.TransformPath)"
Destination="$(WebConfigToTransform)\%(ConfigsToTransform.Identity)"
Condition="Exists(@(Transform))"/>
</Target>
</Project>