基于文件名的条件包含

时间:2018-10-05 20:19:33

标签: msbuild

我希望msbuild仅在不是某个文件(即bla.csproj)时才包含软件包。与下面的行类似。正确的语法是什么?

<label class="threeLabel"> <input type="checkbox" id="chkBusinessActivityStore" name= "Business" class="validate-reqchk-byname label: 'Business Activity'" > "&nbsp;&nbsp;Store" </label> <label class="threeLabel"> <input type="checkbox" id="chkBusinessActivityCoffeeShop" name= "Business" class="validate-reqchk-byname label: 'Business Activity'" > "&nbsp;&nbsp;Coffee Shop" </label> <label class="threeLabel"> <input type="checkbox" id="chkBusinessActivityBar" name= "Business" class="validate-reqchk-byname label: 'Business Activity'" > "&nbsp;&nbsp;Bar" </label>

1 个答案:

答案 0 :(得分:0)

好吧,我想我已经解决了:

<PackageReference Include="StyleCop.Analyzers" Version="1.0.0" PrivateAssets="All" Condition="'$(MSBuildProjectName)' != 'bla'" />