首页 文章

SlowCheetah在MSBuild期间没有转换

提问于
浏览
0

我在一个Web项目中实现了SlowCheetah . 我正在运行NuGet v2.7,但仍然使用启用包恢复 . 我在AntHillPro中运行构建工作流,首先在解决方案上运行NuGet Package Restore,然后运行MSBuild . “包还原”步骤表明它已成功重新安装SLowCheetah,但MSBuild步骤未显示web.config以外的配置文件的转换过程 . 我尝试切换到v2.7 NuGet命令行恢复,但没有改变任何东西 . 我回来了启用包恢复,但我不知道从这里去哪里以及如何调试此问题 . 我发誓它几周前工作正常 . 不确定我是否有SlowCheetah问题或NuGet问题 . 我该如何调试?任何帮助是极大的赞赏 .

1 回答

  • 0

    我有一个类似的问题,事实证明,在合并期间,在我的csproj文件中,PropertyGroup(标记为SlowCheetah)下载了Import元素 .

    它应该是这样的

    <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>
    

    然后

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

    Here是元素顺序在构建文件中很重要的原因 . 希望能帮助到你

相关问题