Method not found: 'Microsoft.CodeCoverage.Core.Configurations.DataCollectorConfiguration Microsoft.CodeCoverage.Core.Configurations.ConfigurationFileUtility.GetConfiguration(System.Xml.XmlElement, Microsoft.CodeCoverage.Core.ILogger)
@fhnaseer đang làm issue này rồi.
Từ ngày 7/10/2025.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Describe the bug
We are updating some packages, and the upgrade for MsTest seems to break some tests in Azure Pipelines:
`Data collector 'Code Coverage' message: Data collector 'Code Coverage' threw an exception during type loading, construction, or initialization: System.MissingMethodException: Method not found: 'Microsoft.CodeCoverage.Core.Configurations.DataCollectorConfiguration Microsoft.CodeCoverage.Core.Configurations.ConfigurationFileUtility.GetConfiguration(System.Xml.XmlElement, Microsoft.CodeCoverage.Core.ILogger)'
Steps To Reproduce
Update MsTest package to v3.8.0 or beyond.
(It seems in this version the CodeCoverage is now a dependency of MSTest metapackage)
WIth .NET472 test projects there is no problem, with .NET8 test projects, we see this error in Azure Pipelines.
Expected behavior
Tests are run and succeed with no errors.
Actual behavior
Test are run and succeed, after we get an error on the Code Coverage.
Additional context
Command line:
D:\a\_tool\dotnet\dotnet.exe test D:\a\29\s\Project\Project.CITest\Project.CITest.csproj --logger trx --results-directory D:\a\_temp --configuration Release --arch x64 --logger trx --settings Project\default.runsettings
Stacktrace;
Data collector 'Code Coverage' message: Data collector 'Code Coverage' threw an exception during type loading, construction, or initialization: System.MissingMethodException: Method not found: 'Microsoft.CodeCoverage.Core.Configurations.DataCollectorConfiguration Microsoft.CodeCoverage.Core.Configurations.ConfigurationFileUtility.GetConfiguration(System.Xml.XmlElement, Microsoft.CodeCoverage.Core.ILogger)'. at Microsoft.VisualStudio.Coverage.DynamicCoverageDataCollector.OnInitialize(XmlElement configurationElement) at Microsoft.VisualStudio.TraceCollector.BaseDataCollector.Initialize(XmlElement configurationElement, IDataCollectionEvents events, IDataCollectionSink dataSink, IDataCollectionLogger logger, IDataCollectionAgentContext agentContext) at Microsoft.VisualStudio.TraceCollector.BaseDataCollector.Initialize(XmlElement configurationElement, DataCollectionEvents events, DataCollectionSink dataSink, DataCollectionLogger logger, DataCollectionEnvironmentContext environmentContext) at Microsoft.VisualStudio.TestPlatform.Common.DataCollector.DataCollectorInformation.InitializeDataCollector(ITelemetryReporter telemetryReporter) in /_/src/Microsoft.TestPlatform.Common/DataCollection/DataCollectorInformation.cs:line 115 at Microsoft.VisualStudio.TestPlatform.Common.DataCollector.DataCollectionManager.LoadAndInitialize(DataCollectorSettings dataCollectorSettings, String settingsXml) in /_/src/Microsoft.TestPlatform.Common/DataCollection/DataCollectionManager.cs:line 537.. Results File: D:\a\_temp\AzDevOps_agent0009TN_2025-10-07_10_45_14.trx
- 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ự
-
[Feat] 조합 영역 구분선 개선 Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
type/automation type/tech-debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
t/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
ci-failure-cause test-failure
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100