Mono.Cecil fails to load when using Microsoft.Testing.Platform on net472
@fhnaseer đang làm issue này rồi.
Từ ngày 31/7/2025.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
I'm attempting to adopt Microsoft.Testing.Platform and with it the new Microsoft.Testing.Extensions.CodeCoverage, however net472 tests all fail to run with the error
Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'Mono.Cecil, Version=0.11.5.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Repro steps
Tests.cs
using Xunit;
public sealed class Tests
{
[Fact]
public void MyTest()
{
Assert.True(true);
}
}
Tests.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;net8.0</TargetFrameworks>
<TestProject>true</TestProject>
<OutputType>Exe</OutputType>
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>
<TestingPlatformShowTestsFailure>true</TestingPlatformShowTestsFailure>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="7.2.0"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0"/>
<PackageReference Include="Microsoft.Testing.Extensions.CodeCoverage" Version="17.13.1" />
<PackageReference Include="Microsoft.Testing.Extensions.TrxReport" Version="1.6.2" />
<PackageReference Include="Moq" Version="4.20.72"/>
<PackageReference Include="Moq.Analyzers" Version="0.3.0"/>
<PackageReference Include="xunit.v3" Version="2.0.0"/>
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.2"/>
</ItemGroup>
</Project>
and then run dotnet test -- --coverage --coverage-output-format cobertura
Additional info
.NET SDK 9.0.201
Windows 11 24H2 OS Build 26100.3476
- Ngôn ngữ chính
- C#
- Star
- 125
- Fork
- 17
- Merge trung bình
- 1 giờ 17 phút
- Pull request đã merge (30 ngày)
- 2
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/codecoverage
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
microsoft/codecoverage#246 · 6 bình luận ·
-
Forward SIGTERM to child process Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
microsoft/codecoverage#237 · 1 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
microsoft/codecoverage#234 · 1 bình luận · 2 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
microsoft/codecoverage#233 · 2 reaction ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 28/100
microsoft/codecoverage#232 · 6 bình luận ·
Tất cả issue của microsoft/codecoverage
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
SubtitleEdit/subtitleedit#15108 · 1 bình luận ·
-
area/docs-content Bug pulumi/docs
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 94/100
-
agentic-workflows untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100