Skip to content

Instantly share code, notes, and snippets.

@JayBazuzi
Created May 31, 2014 20:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JayBazuzi/1d0e58acb2aeda163df3 to your computer and use it in GitHub Desktop.
Save JayBazuzi/1d0e58acb2aeda163df3 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SolutionPath>InspectCodeExample\InspectCodeExample.sln</SolutionPath>
</PropertyGroup>
<PropertyGroup>
<!-- keep this in synch with Tools\PreBuild.ps1 -->
<ResharperCltVersion>8.2.0.2151</ResharperCltVersion>
</PropertyGroup>
<!--=====================================================================-->
<Target Name="Build">
<MSBuild Projects="@(SolutionPath)" />
<CallTarget Targets="InspectCode" />
</Target>
<!--=====================================================================-->
<Target Name="InspectCode">
<!--I found that this approach caused InspectCode to crash with cryptic errors -->
<!--<InspectCode SolutionFile="$(SolutionPath)" OutputFile="$(TEMP)\InspectCodeOutput.xml" NoMSBuildOutput="true" />-->
<Exec Command="C:\Chocolatey\bin\InspectCode /o=$(TEMP)\InspectCodeOutput.xml $(SolutionPath)" />
<Exec Command="fc.exe InspectCodeBaseline.xml $(TEMP)\InspectCodeOutput.xml" />
</Target>
<!-- Required if you use the InspectCode target above -->
<!--<Import Project="C:\Chocolatey\lib\resharper-clt.portable.$(ResharperCltVersion)\tools\InspectCode.MsBuild.Targets"/>-->
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment