TeamCity.dotCover/pack/TeamCity.dotCover.targets (9 lines of code) (raw):

<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup Condition=" '$(IsUnderTeamCity)' == '' "> <IsUnderTeamCity Condition=" '$(TEAMCITY_PROJECT_NAME)' != '' or '$(TEAMCITY_VERSION)' != '' ">true</IsUnderTeamCity> </PropertyGroup> <Target Name="RestoreDotCover" BeforeTargets="VSTest" Condition=" '$(IsUnderTeamCity)' == 'true' AND '$(OS)' == 'Windows_NT' AND '$(MSBuildRuntimeType)' == 'Core' "> <MSBuild Projects="$(MSBuildThisFileDirectory)\dotCoverRestore.csproj" Targets="Restore"/> </Target> </Project>