You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.
There is a bug with the current implementation that was identified by Dan Bullock on 9/19/2017 wherein the extensions is created a new AfterBuild section in the project file for each config transform in a project, which causes only the first transform to be applied in a scenario where a project has more than one config file that needs to be transformed. Dan also presents the solution there. Please fix it if you have time.
"The sample project is not correct. The sample defines multiple <AfterBuild> but when it actually can only be defined once. Each definition replaces the previous.
In .csproj it should be a single AfterBuild with each TransformXml having a condition:
<Target Name="AfterBuild">
<!--Generate transformed config in the output directory-->
<TransformXml Condition="Exists('data.$(Configuration).config')" Source="data.config" Destination="$(OutputPath)data.config" Transform="data.$(Configuration).config" />
<TransformXml Condition="Exists('plainxml.$(Configuration).config')" Source="plainxml.config" Destination="$(OutputPath)plainxml.config" Transform="plainxml.$(Configuration).config" />
</Target>
By Dan Bullock 9/19/2017"
The text was updated successfully, but these errors were encountered:
The solution is to generate this (then both get executed): <Target Name="AfterBuild"> <!--Generate transformed config in the output directory--> <TransformXml Condition="Exists('data.$(Configuration).config')" Source="data.config" Destination="$(OutputPath)data.config" Transform="data.$(Configuration).config" /> <TransformXml Condition="Exists('plainxml.$(Configuration).config')" Source="plainxml.config" Destination="$(OutputPath)plainxml.config" Transform="plainxml.$(Configuration).config" /> </Target>
Fix encoding message in visual studio of added transform files .
Add messages to output window.
Move transformation to new class.
Update csproj file - run experimental instance for debug.
There is a bug with the current implementation that was identified by Dan Bullock on 9/19/2017 wherein the extensions is created a new AfterBuild section in the project file for each config transform in a project, which causes only the first transform to be applied in a scenario where a project has more than one config file that needs to be transformed. Dan also presents the solution there. Please fix it if you have time.
The text was updated successfully, but these errors were encountered: