Skip to content

Commit 2463742

Browse files
committed
Coverage doesn't work with net472.
1 parent e2c95db commit 2463742

File tree

4 files changed

+8
-31
lines changed

4 files changed

+8
-31
lines changed

build/Coverage.runsettings

Lines changed: 0 additions & 18 deletions
This file was deleted.

codecov.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

default.proj

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@
6262
</Target>
6363
<Target Name="Test">
6464
<MakeDir Directories="$(LogDirectory)" />
65-
<Exec Command="dotnet test &quot;%(SolutionFile.FullPath)&quot; -c $(Configuration) --results-directory &quot;$(LogDirectory)&quot; --logger:trx /p:Version=$(Version) --collect:&quot;XPlat Code Coverage&quot; --settings &quot;$(CoverageRunSettings)&quot;" />
65+
66+
<!--
67+
There's a problem where Coverlet doesn't sign the instrumented assembly, and
68+
while this is fine for .NET Core, it breaks the build for .NET Framework.
69+
Since this project is largely maintenance, we can skip coverage.
70+
-->
71+
<Exec Command="dotnet test &quot;%(SolutionFile.FullPath)&quot; -c $(Configuration) --results-directory &quot;$(LogDirectory)&quot; --logger:trx /p:Version=$(Version)" />
6672
</Target>
6773
</Project>

test/Autofac.Integration.WebApi.Test/Autofac.Integration.WebApi.Test.csproj

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<IsPackable>false</IsPackable>
1313
<LangVersion>latest</LangVersion>
1414
<ImplicitUsings>enable</ImplicitUsings>
15+
<PreserveCompilationContext>true</PreserveCompilationContext>
1516
</PropertyGroup>
1617
<ItemGroup>
1718
<Using Include="Moq" />
@@ -29,10 +30,6 @@
2930
<Reference Include="System.Transactions" />
3031
</ItemGroup>
3132
<ItemGroup>
32-
<PackageReference Include="coverlet.collector" Version="6.0.4">
33-
<PrivateAssets>all</PrivateAssets>
34-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
35-
</PackageReference>
3633
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
3734
<PackageReference Include="Moq" Version="[4.16.1]" />
3835
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">

0 commit comments

Comments
 (0)