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 13
13
<Exec Command =" dotnet build " $(MSBuildThisFileDirectory)src\coverlet.collector\coverlet.collector.csproj" -c $(Configuration)" />
14
14
</Target >
15
15
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" >
29
17
<Exec Command =" dotnet test " $(MSBuildThisFileDirectory)test\coverlet.core.tests\coverlet.core.tests.csproj" -c $(Configuration) /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Include=[coverlet.*]*" />
30
18
<Exec Command =" dotnet test " $(MSBuildThisFileDirectory)test\coverlet.collector.tests\coverlet.collector.tests.csproj" -c $(Configuration) /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Include=[coverlet.*]*" />
31
19
</Target >
Original file line number Diff line number Diff line change 16
16
<ThresholdType Condition =" $(ThresholdType) == ''" >line,branch,method</ThresholdType >
17
17
<ThresholdStat Condition =" $(ThresholdStat) == ''" >minimum</ThresholdStat >
18
18
</PropertyGroup >
19
+ <PropertyGroup >
20
+ <CoverletToolsPath Condition =" '$(CoverletToolsPath)' == '' " >$(MSBuildThisFileDirectory)</CoverletToolsPath >
21
+ </PropertyGroup >
19
22
</Project >
Original file line number Diff line number Diff line change 1
1
<Project xmlns =" http://schemas.microsoft.com/developer/msbuild/2003" >
2
2
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" />
5
5
6
6
<Target Name =" InstrumentModulesNoBuild" BeforeTargets =" VSTest" >
7
7
<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 1
1
<Project Sdk =" Microsoft.NET.Sdk" >
2
- <Import Project =" $(MSBuildThisFileDirectory)\ ..\..\build\$(Configuration) \coverlet.msbuild.props" />
2
+ <Import Project =" ..\..\src\coverlet.msbuild.tasks \coverlet.msbuild.props" />
3
3
4
4
<PropertyGroup >
5
5
<TargetFramework >netcoreapp2.0</TargetFramework >
15
15
<ProjectReference Include =" ..\coverlet.testsubject\coverlet.testsubject.csproj" />
16
16
</ItemGroup >
17
17
18
- <Import Project =" $(MSBuildThisFileDirectory)\ ..\..\build\$(Configuration) \coverlet.msbuild.targets" />
18
+ <Import Project =" ..\..\src\coverlet.msbuild.tasks \coverlet.msbuild.targets" />
19
19
</Project >
Original file line number Diff line number Diff line change 1
1
<Project Sdk =" Microsoft.NET.Sdk" >
2
- <Import Project =" $(MSBuildThisFileDirectory)\ ..\..\build\$(Configuration) \coverlet.msbuild.props" />
2
+ <Import Project =" ..\..\src\coverlet.msbuild.tasks \coverlet.msbuild.props" />
3
3
4
4
<PropertyGroup >
5
5
<TargetFramework >netcoreapp2.0</TargetFramework >
19
19
<ProjectReference Include =" ..\..\src\coverlet.core\coverlet.core.csproj" />
20
20
</ItemGroup >
21
21
22
- <Import Project =" $(MSBuildThisFileDirectory)\ ..\..\build\$(Configuration) \coverlet.msbuild.targets" />
22
+ <Import Project =" ..\..\src\coverlet.msbuild.tasks \coverlet.msbuild.targets" />
23
23
</Project >
You can’t perform that action at this time.
0 commit comments