microsoft/slow-cheetah

Different behavior in Preview and Publish

jotabe-net opened this issue · 0 comments

SlowCheetah 3.2.26 - VS 2019

I introduced 2 levels of <configuration> tags by error, in the transform file, like this:

<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
  <configuration>
    <appSettings>
      <add xdt:Locator="Match(key)" xdt:Transform="Replace" key="XXX" value="XXX"/>
       <!-- some other locators/operations... -->

The behavior is:

  • In Preview, the transform is doing nothing (that's right, it's in the wrong path)
  • In Publish, the transform is succesfully modifying the app settings, which should not happen

The project file includes this part:

  <Import Project="..\packages\Microsoft.VisualStudio.SlowCheetah.3.2.26\build\Microsoft.VisualStudio.SlowCheetah.targets" Condition="Exists('..\packages\Microsoft.VisualStudio.SlowCheetah.3.2.26\build\Microsoft.VisualStudio.SlowCheetah.targets')" />
  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
    <PropertyGroup>
      <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
    </PropertyGroup>
    <Error Condition="!Exists('..\packages\Microsoft.VisualStudio.SlowCheetah.3.2.26\build\Microsoft.VisualStudio.SlowCheetah.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.VisualStudio.SlowCheetah.3.2.26\build\Microsoft.VisualStudio.SlowCheetah.targets'))" />
  </Target>

And I can't see any errors in the build output. Just this message:

2>Transformed Web.config using D:\FolderName\ProjectName\Web.Release.config into obj\Release\TransformWebConfig\transformed\Web.config.