title: Config file transformation doesn't work on build server after migration to package reference format
body: <p>I am using Microsoft.VisualStudio.SLowCheetah (v3.0.61) package to transform several configuration files to the release version during the build.</p>
  
  <p>Recently i have migrated all projects in the solution from packages.config to package reference format. After that transformations performed by SlowCheetah have broken on the build server. In case of local publishing to the file system from Visual Studio 2017 (v 15.6.7) all is working fine.
  Previously all targets from SlowCheetah was directly imported in the end of</p>
  
  <blockquote>
    <p>*.csproj</p>
  </blockquote>
  
  <p>file. In package reference approach all targets from the used packages are merged to the</p>
  
  <blockquote>
    <p>obj/PROJECTNAME.csproj.nuget.g.targets</p>
  </blockquote>
  
  <p>file. This issue affects only Web Project. (Transformations for App.config files in projects with integration tests are working fine.)</p>
  
  <p>I am using next command on the build server for restoring packages:</p>
  
  <pre><code>nuget.exe restore "C:\PATH\Web.Site.sln" -Verbosity Normal -NonInteractive -ConfigFile C:\PATH\NuGet.Config
  </code></pre>
  
  <p>And next one for building solution:</p>
  
  <pre><code>msbuild.exe "C:\PATH\WizNG.App.Site.sln" /nologo /nr:false /p:DeployOnBuild=true /p:PublishProfile="FileSystem.pubxml" /p:platform="any cpu" /p:configuration="release" /p:VisualStudioVersion="15.0" /m /verbosity:normal
  </code></pre>
  
  <p>Fragment of csproj file with config files:</p>
  
  <pre><code>&lt;Content Include="NLog.config"&gt;
    &lt;CopyToOutputDirectory&gt;Always&lt;/CopyToOutputDirectory&gt;
    &lt;SubType&gt;Designer&lt;/SubType&gt;
    &lt;TransformOnBuild&gt;true&lt;/TransformOnBuild&gt;
  &lt;/Content&gt;
  &lt;None Include="NLog.Debug.config"&gt;
    &lt;DependentUpon&gt;NLog.config&lt;/DependentUpon&gt;
    &lt;IsTransformFile&gt;True&lt;/IsTransformFile&gt;
  &lt;/None&gt;
  &lt;None Include="NLog.Local.config"&gt;
    &lt;DependentUpon&gt;NLog.config&lt;/DependentUpon&gt;
    &lt;IsTransformFile&gt;True&lt;/IsTransformFile&gt;
  &lt;/None&gt;
  &lt;None Include="NLog.Release.config"&gt;
    &lt;DependentUpon&gt;NLog.config&lt;/DependentUpon&gt;
    &lt;IsTransformFile&gt;True&lt;/IsTransformFile&gt;
  &lt;/None&gt;
  &lt;Content Include="Myconfig1.config"&gt;
    &lt;SubType&gt;Designer&lt;/SubType&gt;
    &lt;TransformOnBuild&gt;true&lt;/TransformOnBuild&gt;
  &lt;/Content&gt;
  &lt;None Include="Myconfig1.Local.config"&gt;
    &lt;DependentUpon&gt;Myconfig1.config&lt;/DependentUpon&gt;
    &lt;IsTransformFile&gt;True&lt;/IsTransformFile&gt;
  &lt;/None&gt;
  &lt;None Include="Myconfig1.Release.config"&gt;
    &lt;DependentUpon&gt;Myconfig1.config&lt;/DependentUpon&gt;
    &lt;IsTransformFile&gt;True&lt;/IsTransformFile&gt;
  &lt;/None&gt;
  &lt;None Include="Myconfig1.Debug.config"&gt;
    &lt;DependentUpon&gt;Myconfig1.config&lt;/DependentUpon&gt;
    &lt;IsTransformFile&gt;True&lt;/IsTransformFile&gt;
  &lt;/None&gt;
  </code></pre>
  
  <p>I am using MSBuild v 15.0</p>
  
  <p><strong>UPDATE 1</strong></p>
  
  <p>*.csproj file contains next imports:</p>
  
  <pre><code> &lt;Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /&gt;
   &lt;Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" /&gt;
   &lt;Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" /&gt;
  </code></pre>
  
  <p>After some investigation i noticed that in case of changing order of import from</p>
  
  <pre><code>Microsoft.CSharp.targets 
  Microsoft.WebApplication.targets
  </code></pre>
  
  <p>to</p>
  
  <pre><code>Microsoft.WebApplication.targets
  Microsoft.CSharp.targets 
  </code></pre>
  
  <p>transformation begins to work.</p>
  
  <p>Does this change have some other impact ?</p>