SlowCheetah not transforming file on build

For me I found the issue was that the slow cheetah property group in the config file was below the section where it checked if it existed.

So the fix was simply to move the property group above that line somewhere which would allow the transform to run as expected.

Put this:

<PropertyGroup Label="SlowCheetah">
  <SlowCheetahToolsPath>$([System.IO.Path]::GetFullPath( $(MSBuildProjectDirectory)\..\packages\SlowCheetah.2.5.10.3\tools\))</SlowCheetahToolsPath>
  <SlowCheetah_EnableImportFromNuGet Condition=" '$(SC_EnableImportFromNuGet)'=='' ">true</SlowCheetah_EnableImportFromNuGet>
  <SlowCheetah_NuGetImportPath Condition=" '$(SlowCheetah_NuGetImportPath)'=='' ">$([System.IO.Path]::GetFullPath( $(MSBuildProjectDirectory)\Properties\SlowCheetah\SlowCheetah.Transforms.targets ))</SlowCheetah_NuGetImportPath>
  <SlowCheetahTargets Condition=" '$(SlowCheetah_EnableImportFromNuGet)'=='true' and Exists('$(SlowCheetah_NuGetImportPath)') ">$(SlowCheetah_NuGetImportPath)</SlowCheetahTargets>
</PropertyGroup>

Above this:

<Import Project="$(SlowCheetahTargets)" Condition="Exists('$(SlowCheetahTargets)')" Label="SlowCheetah" />

Check in your Project, if there exists a folder named SlowCheetah containing the file SlowCheetah.Transforms.targets. If this file is missing, try the following steps:

  1. right click on solution
  2. "Manage NuGet Packages for Solution...", browse for SlowCheetah
  3. click on "Manage"
  4. deselect your project and click "Ok"
  5. click on "Manage" again
  6. select your project and click once more "Ok"

This will recreate the missing file.