Run VS2013-compatible FxCop rules on VS2013.

This commit is contained in:
davidmatson 2013-11-08 13:26:15 -08:00
Родитель 1bfee49f63
Коммит 1a9445aa27
4 изменённых файлов: 16 добавлений и 2 удалений

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

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Web.FxCop" version="2.0.0" />
</packages>

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

@ -70,6 +70,7 @@
RestorePackages against every project. -->
<RestorePackages
Include=".nuget\packages.config;
.nuget\vs2013\packages.config;
src\Microsoft.AspNet.Mvc.Facebook\packages.config;
src\Microsoft.Web.WebPages.OAuth\packages.config;
src\System.Net.Http.Formatting.NetCore\packages.config;
@ -80,6 +81,15 @@
</ItemGroup>
<Message Text="Restoring NuGet packages..." Importance="High" />
<Exec Command='"$(NuGetExe)" restore "%(RestorePackages.Identity)" -PackagesDirectory packages -NonInteractive -Verbosity quiet -ConfigFile .nuget\NuGet.Config' />
<!-- Pick the right Microsoft.Web.FxCop package to use and copy it to a standard location. -->
<PropertyGroup>
<CustomFxCopRulesPath>packages\CustomFxCopRules</CustomFxCopRulesPath>
<MicrosoftWebFxCopVersion Condition=" '$(MicrosoftWebFxCopVersion)' == '' and '$(MSBuildToolsVersion)' == '12.0' ">2.0.0</MicrosoftWebFxCopVersion>
<MicrosoftWebFxCopVersion Condition=" '$(MicrosoftWebFxCopVersion)' == '' ">1.0.1</MicrosoftWebFxCopVersion>
</PropertyGroup>
<Copy Condition="!Exists('$(CustomFxCopRulesPath)\Microsoft.Web.FxCop.dll')"
SourceFiles="packages\Microsoft.Web.FxCop.$(MicrosoftWebFxCopVersion)\Microsoft.Web.FxCop.dll"
DestinationFolder="$(CustomFxCopRulesPath)" />
</Target>
<Target Name="Build" DependsOnTargets="RestorePackages">

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

@ -33,4 +33,4 @@ goto end
:End
popd
endlocal
endlocal

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

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="FxCop rules for ASP.NET Web Stack" Description="This rule set contains the rules for ASP.NET Web Stack." ToolsVersion="10.0">
<RuleHintPaths>
<Path>..\packages\Microsoft.Web.FxCop.1.0.1</Path>
<Path>..\packages\CustomFxCopRules</Path>
</RuleHintPaths>
<IncludeAll Action="Error" />
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">