Question

I've implemented SlowCheetah in a web project. I'm running NuGet v2.7, but still using Enable Package Restore. I run a build workflow in AntHillPro that first runs NuGet Package Restore then MSBuild on the solution. The Package Restore steps indicates it is successfully reinstalling SLowCheetah, but the MSBuild step shows no execution of the transform process for config files other than web.config. I tried switching to the v2.7 NuGet Command Line Restore but that changed nothing. I'm back with Enable Package Restore but I have no idea where to go from here and how to debug this problem. I'd swear it was working correctly a couple of weeks ago. Not sure if I have a SlowCheetah problem or a NuGet problem. How do I debug this? Any help is greatly appreciated.

Was it helpful?

Solution

I had a similar problem and it turned out that during a merge, in my csproj file, the PropertyGroup (labelled SlowCheetah) went down the Import element.

It should be like 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>

Then

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

Here is why the order of elements is important in a build file. Hope it helps

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top