This is a minimal test project created to reproduce and investigate a specific issue related to code coverage.
The project uses .NET 8 and includes basic dependencies to simulate the problem scenario.
The repository is intended for sharing with others to help diagnose or demonstrate the code coverage issue.
-
Clone the repository.
-
Open the solution in Visual Studio or VS Code.
-
Build the project.
-
Run the tests:
dotnet test .\TestProject\TestProject.csproj --settings .\default.runsettings
When running the tests, you should encounter the following error:
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)'
- No sensitive information is included.
- This project is for testing and reproduction purposes only.