File tree Expand file tree Collapse file tree 6 files changed +30
-19
lines changed
src/coverlet.msbuild.tasks
coverlet.core.performancetest Expand file tree Collapse file tree 6 files changed +30
-19
lines changed Original file line number Diff line number Diff line change 1313 <Exec Command =" dotnet build " $(MSBuildThisFileDirectory)src\coverlet.collector\coverlet.collector.csproj" -c $(Configuration)" />
1414 </Target >
1515
16- <Target Name =" PublishMSBuildTaskProject" AfterTargets =" BuildAllProjects" >
17- <Exec Command =" dotnet publish " $(MSBuildThisFileDirectory)src\coverlet.msbuild.tasks\coverlet.msbuild.tasks.csproj" -c $(Configuration) -o " $(OutputPath)" " />
18- </Target >
19-
20- <Target Name =" CopyMSBuildScripts" AfterTargets =" PublishMSBuildTaskProject" >
21- <ItemGroup >
22- <BuildScript Include =" $(MSBuildThisFileDirectory)src\coverlet.msbuild.tasks\coverlet.msbuild.props" />
23- <BuildScript Include =" $(MSBuildThisFileDirectory)src\coverlet.msbuild.tasks\coverlet.msbuild.targets" />
24- </ItemGroup >
25- <Copy SourceFiles =" @(BuildScript)" DestinationFolder =" $(OutputPath)" />
26- </Target >
27-
28- <Target Name =" RunTests" AfterTargets =" CopyMSBuildScripts" >
16+ <Target Name =" RunTests" AfterTargets =" BuildAllProjects" >
2917 <Exec Command =" dotnet test " $(MSBuildThisFileDirectory)test\coverlet.core.tests\coverlet.core.tests.csproj" -c $(Configuration) /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Include=[coverlet.*]*" />
3018 <Exec Command =" dotnet test " $(MSBuildThisFileDirectory)test\coverlet.collector.tests\coverlet.collector.tests.csproj" -c $(Configuration) /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Include=[coverlet.*]*" />
3119 </Target >
Original file line number Diff line number Diff line change 1616 <ThresholdType Condition =" $(ThresholdType) == ''" >line,branch,method</ThresholdType >
1717 <ThresholdStat Condition =" $(ThresholdStat) == ''" >minimum</ThresholdStat >
1818 </PropertyGroup >
19+ <PropertyGroup >
20+ <CoverletToolsPath Condition =" '$(CoverletToolsPath)' == '' " >$(MSBuildThisFileDirectory)</CoverletToolsPath >
21+ </PropertyGroup >
1922</Project >
Original file line number Diff line number Diff line change 11<Project xmlns =" http://schemas.microsoft.com/developer/msbuild/2003" >
22
3- <UsingTask TaskName =" Coverlet.MSbuild.Tasks.InstrumentationTask" AssemblyFile =" $(MSBuildThisFileDirectory )coverlet.msbuild.tasks.dll" />
4- <UsingTask TaskName =" Coverlet.MSbuild.Tasks.CoverageResultTask" AssemblyFile =" $(MSBuildThisFileDirectory )coverlet.msbuild.tasks.dll" />
3+ <UsingTask TaskName =" Coverlet.MSbuild.Tasks.InstrumentationTask" AssemblyFile =" $(CoverletToolsPath )coverlet.msbuild.tasks.dll" />
4+ <UsingTask TaskName =" Coverlet.MSbuild.Tasks.CoverageResultTask" AssemblyFile =" $(CoverletToolsPath )coverlet.msbuild.tasks.dll" />
55
66 <Target Name =" InstrumentModulesNoBuild" BeforeTargets =" VSTest" >
77 <Coverlet .MSbuild.Tasks.InstrumentationTask
Original file line number Diff line number Diff line change 1+ <Project >
2+ <Choose >
3+ <!-- This condition tests whether coverlet.msbuild.props has been imported by the project -->
4+ <When Condition =" '$(ThresholdType)' != '' " >
5+ <ItemGroup >
6+ <!-- Arrange for the project that builds the build tools has built first. -->
7+ <ProjectReference Include =" $(MSBuildThisFileDirectory)\..\src\coverlet.msbuild.tasks\coverlet.msbuild.tasks.csproj" >
8+ <ReferenceOutputAssembly >false</ReferenceOutputAssembly >
9+ </ProjectReference >
10+ </ItemGroup >
11+ <PropertyGroup >
12+ <!-- Ensure that the built tools can be found at build time.
13+ This is required when the coverlet.msbuild imports are made in their src directory
14+ (so that msbuild eval works even before they are built)
15+ so that they can still find the tooling that will be built by the build. -->
16+ <CoverletToolsPath >$(MSBuildThisFileDirectory)..\src\coverlet.msbuild.tasks\bin\$(Configuration)\netstandard2.0\</CoverletToolsPath >
17+ </PropertyGroup >
18+ </When >
19+ </Choose >
20+ </Project >
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
2- <Import Project =" $(MSBuildThisFileDirectory)\ ..\..\build\$(Configuration) \coverlet.msbuild.props" />
2+ <Import Project =" ..\..\src\coverlet.msbuild.tasks \coverlet.msbuild.props" />
33
44 <PropertyGroup >
55 <TargetFramework >netcoreapp2.0</TargetFramework >
1515 <ProjectReference Include =" ..\coverlet.testsubject\coverlet.testsubject.csproj" />
1616 </ItemGroup >
1717
18- <Import Project =" $(MSBuildThisFileDirectory)\ ..\..\build\$(Configuration) \coverlet.msbuild.targets" />
18+ <Import Project =" ..\..\src\coverlet.msbuild.tasks \coverlet.msbuild.targets" />
1919</Project >
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
2- <Import Project =" $(MSBuildThisFileDirectory)\ ..\..\build\$(Configuration) \coverlet.msbuild.props" />
2+ <Import Project =" ..\..\src\coverlet.msbuild.tasks \coverlet.msbuild.props" />
33
44 <PropertyGroup >
55 <TargetFramework >netcoreapp2.0</TargetFramework >
1919 <ProjectReference Include =" ..\..\src\coverlet.core\coverlet.core.csproj" />
2020 </ItemGroup >
2121
22- <Import Project =" $(MSBuildThisFileDirectory)\ ..\..\build\$(Configuration) \coverlet.msbuild.targets" />
22+ <Import Project =" ..\..\src\coverlet.msbuild.tasks \coverlet.msbuild.targets" />
2323</Project >
You can’t perform that action at this time.
0 commit comments