Run VS2013-compatible FxCop rules on VS2013.
This commit is contained in:
Родитель
1bfee49f63
Коммит
1a9445aa27
|
@ -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 against every project. -->
|
||||||
<RestorePackages
|
<RestorePackages
|
||||||
Include=".nuget\packages.config;
|
Include=".nuget\packages.config;
|
||||||
|
.nuget\vs2013\packages.config;
|
||||||
src\Microsoft.AspNet.Mvc.Facebook\packages.config;
|
src\Microsoft.AspNet.Mvc.Facebook\packages.config;
|
||||||
src\Microsoft.Web.WebPages.OAuth\packages.config;
|
src\Microsoft.Web.WebPages.OAuth\packages.config;
|
||||||
src\System.Net.Http.Formatting.NetCore\packages.config;
|
src\System.Net.Http.Formatting.NetCore\packages.config;
|
||||||
|
@ -80,6 +81,15 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Message Text="Restoring NuGet packages..." Importance="High" />
|
<Message Text="Restoring NuGet packages..." Importance="High" />
|
||||||
<Exec Command='"$(NuGetExe)" restore "%(RestorePackages.Identity)" -PackagesDirectory packages -NonInteractive -Verbosity quiet -ConfigFile .nuget\NuGet.Config' />
|
<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>
|
||||||
|
|
||||||
<Target Name="Build" DependsOnTargets="RestorePackages">
|
<Target Name="Build" DependsOnTargets="RestorePackages">
|
||||||
|
|
|
@ -33,4 +33,4 @@ goto end
|
||||||
|
|
||||||
:End
|
:End
|
||||||
popd
|
popd
|
||||||
endlocal
|
endlocal
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?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">
|
<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>
|
<RuleHintPaths>
|
||||||
<Path>..\packages\Microsoft.Web.FxCop.1.0.1</Path>
|
<Path>..\packages\CustomFxCopRules</Path>
|
||||||
</RuleHintPaths>
|
</RuleHintPaths>
|
||||||
<IncludeAll Action="Error" />
|
<IncludeAll Action="Error" />
|
||||||
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
|
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
|
||||||
|
|
Загрузка…
Ссылка в новой задаче