SlowCheetah no longer working in VS2019
AndyWDev opened this issue · 1 comments
I have a .Net 4.7.2 Console Project that has been working with SlowCheetah for some time. I recently went to build the project and found that none of the transforms are being applied (or copied as a result).
I am using VS2019 16.11.16 with what looks like SlowCheetah extension version 3.2.18.4433. The Nuget package version appears to be 4.0.8.
My console app has three Custom Configurations and three app.xyz.config transforms under the default app.config. What I am seeing is the default app.config being copied to the obj and bin directories (as xyz.exe.config).
In the vs project file, the Afterpublish Target is followed by the PrePareForBuild target at the end of the file.
The build output contains the following line:-
Task "Error" skipped, due to false condition; (!Exists('....\xyz\packages\Microsoft.VisualStudio.SlowCheetah.4.0.8\build\Microsoft.VisualStudio.SlowCheetah.targets')) was evaluated as (!Exists('....\xyz\packages\Microsoft.VisualStudio.SlowCheetah.4.0.8\build\Microsoft.VisualStudio.SlowCheetah.targets')).
SlowCheetah: Applying Transforms
Task "SlowCheetah.TransformTask" skipped, due to false condition; (Exists('%(TransformFile)')) was evaluated as (Exists(''))
Task "SlowCheetah.TransformTask" skipped, due to false condition; ('$(_ScHasAppConfigConfigurationTransform)' == 'true') was evaluated as ('' == 'true').
Task "SlowCheetah.TransformTask" skipped, due to false condition; ('$(_ScHasAppConfigPublishProfileTransform)'=='true') was evaluated as (''=='true').
I have checked the existing transforms match the Configuration Manager settings as well as creating an new configuration and transform just in case.
Regards
I'll close this issue as I was able to resolve it, although not sure of the cause.
I noticed that I was getting a TransformXML error on build, also the preview transform menu was missing.
To solve the issue, this is what worked for me.
- Take copy of existing app.config transforms
- Remove all configurations for the solution and create new ones with the same names
- Remove the transforms from under app.config
- Run Remove Old Transform and then Add Transform (this created new transform files with the same names as the old ones).
- Update the transform files with the correct content.
At this stage I noticed I had the 'Preview Transform' menu back again. I ended up with SlowCheetah Extension version 3.2.184433, and Nuget package 3.2.20 (what was referenced in the project file).
Doing a build I could see the build step for SlowCheetah 'Found App.Config" and the transform was applied to the config file in the bin directory.