<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Msbuild on ZeroSharp</title><link>https://www.zerosharp.com/blog/categories/msbuild/</link><description>Recent content in Msbuild on ZeroSharp</description><generator>Hugo</generator><language>en-gb</language><copyright>Copyright © 2012–{year} Robert Anderson</copyright><lastBuildDate>Wed, 13 Aug 2014 06:39:00 +0100</lastBuildDate><atom:link href="https://www.zerosharp.com/blog/categories/msbuild/index.xml" rel="self" type="application/rss+xml"/><item><title>Persisting changes to config files within NuGet packages</title><link>https://www.zerosharp.com/persisting-changes-to-config-files-within-nuget-packages/</link><pubDate>Wed, 13 Aug 2014 06:39:00 +0100</pubDate><guid>https://www.zerosharp.com/persisting-changes-to-config-files-within-nuget-packages/</guid><description>&lt;p&gt;Whenever NuGet updates or restores a NuGet package, the config files within it are overwritten. Here&amp;rsquo;s a method to make sure the changes are reapplied via a &lt;a href="http://msdn.microsoft.com/en-us/library/dd465326.aspx"&gt;config transform&lt;/a&gt; whenever the solution is built.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m using the NUnit.Runners NuGet packages. To get our coverage tool to play nicely, I need to replace &lt;code&gt;&amp;lt;supportedRuntime &amp;quot;v2.0.50727&amp;quot;&amp;gt;&lt;/code&gt; with &lt;code&gt;&amp;lt;supportedRuntime &amp;quot;v4.0.30319&amp;quot;&amp;gt;&lt;/code&gt; within the &lt;em&gt;NUnit-console-x86.exe.config&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Normally, a config transform is for modifying the &lt;em&gt;web.config&lt;/em&gt; or &lt;em&gt;app.config&lt;/em&gt; files. Here, we need to modify a config file within the &lt;em&gt;packages&lt;/em&gt; subdirectory.&lt;/p&gt;</description></item></channel></rss>