Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
<?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