문제

I have inherited a solution file that uses a MSBuild script to compile multiple solutions. The majority of projects are configured with analysis and rulesets and I have a few unit-test projects that don't.

Projects with analysis turned on:

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
  <DebugSymbols>true</DebugSymbols>
  <DebugType>full</DebugType>
  <DefineConstants>CODE_ANALYSIS;DEBUG;TRACE</DefineConstants>
  <Optimize>false</Optimize>
  <OutputPath>bin\Debug</OutputPath>
  <PlatformTarget>x86</PlatformTarget>
  <CodeAnalysisRuleSet>..\OurRules.ruleset</CodeAnalysisRuleSet>
  <RunCodeAnalysis>true</RunCodeAnalysis>
 </PropertyGroup>

Projects with analysis turned off:

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
  <DebugSymbols>true</DebugSymbols>
  <DebugType>full</DebugType>
  <DefineConstants>DEBUG;TRACE</DefineConstants>
  <Optimize>false</Optimize>
  <OutputPath>bin\Debug</OutputPath>
  <PlatformTarget>x86</PlatformTarget>
  <RunCodeAnalysis>false</RunCodeAnalysis>
 </PropertyGroup>

When I run my build script, it looks like some projects are not respecting the project settings:

msbuild.exe BuildScript.proj /p:SolutionRoot=%cd%; /p:Configuration=Debug /p:Platform:x86 /p:RunCodeAnalysis=True

When I check the output folder, I see coverage analysis xml outputs for projects that have the RunCodeAnalysis flag set to false. Can someone help me understand what's going on here?

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top