I have a project I am trying to use SlowCheetah for. I have created my config file (Test.web.config) and all the transformations I want to use (Debug_Mock.config, Debug_SQL.config, Release) in my Build configuration I have a post-build event is supposed to copy the transformed file into another directory but the file cannot be found
(error xcopy exited with code 4)
SlowCheetah doesn't seem to be transforming the file and placing it in the output directory (bin folder) like I would expect. Does anyone have any ideas as to why it is not happening, maybe a setting somewhere?
FYI: This process works on another machine, with the same project. As far as I can tell the same set up as well. But I may not be looking in the correct place.
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:
This will recreate the missing file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With