Microsoft.Web.FxCop builds against the wrong FxCop version

Microsoft.Web.FxCop.csproj attempts to use the 12.0 version of the FxCop
binaries even if the passed in VisualStudio version is 11.0. This causes
it to compile against 12.0 but run using the 11.0 FxCopCmd.exe causing it
to fail. Instead we'll use the passed in VisualStudioVersion to select the
FxCop SDK binaries to compile against

Work Item: 1556
This commit is contained in:
Pranav K 2013-12-16 10:10:32 -08:00
Родитель 4abdcb8d33
Коммит b9d1e07f0e
1 изменённых файлов: 2 добавлений и 7 удалений

Просмотреть файл

@ -31,12 +31,7 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<Dev11FxCopLocation>$(MSBuildProgramFiles32)\Microsoft Visual Studio 11.0\Team Tools\Static Analysis Tools\FxCop\</Dev11FxCopLocation>
<Dev12FxCopLocation>$(MSBuildProgramFiles32)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\FxCop\</Dev12FxCopLocation>
<FxCopLocation>
</FxCopLocation>
<FxCopLocation Condition=" EXISTS('$(Dev11FxCopLocation)') ">$(Dev11FxCopLocation)</FxCopLocation>
<FxCopLocation Condition=" EXISTS('$(Dev12FxCopLocation)') ">$(Dev12FxCopLocation)</FxCopLocation>
<FxCopLocation>$(MSBuildProgramFiles32)\Microsoft Visual Studio $(VisualStudioVersion)\Team Tools\Static Analysis Tools\FxCop\</FxCopLocation>
</PropertyGroup>
<ItemGroup>
<Reference Include="FxCopSdk">
@ -73,7 +68,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<!-- If the FxCop SDK does not exist at all have this build no-op. -->
<BuildDependsOn Condition=" '$(FxCopLocation)' == '' ">
<BuildDependsOn Condition=" !Exists('$(FxCopLocation)') ">
</BuildDependsOn>
</PropertyGroup>
</Project>