microsoft / microsoft/codecoverage
Microsoft.Testing.Extensions.CodeCoverage does not support MSBuild isolation
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 125
- Forks
- 17
- Avg merge
- 1h 17m
- Merged PRs (30d)
- 2
Description
When building a MTP project with /isolate we are observing this issue:
C:\Users\X\.nuget\packages\microsoft.testing.extensions.codecoverage\18.1.0\buildMultiTargeting\Microsoft.Testing.Extensions.CodeCoverage.targets(18,5): error
MSB4252: Project "C:\src\Foo.csproj" with global properties
(NuGetInteractive=true; IsGraphBuild=true)
is building project "C:\src\Bar.csproj" with global properties
(NuGetInteractive=true; IsGraphBuild=true)
with the (InitializeSourceRootMappedPaths) target(s) but the build result for the built project is not in the engine cache. In isolated builds this could mean one of the following:
- the reference was called with a target which is not specified in the ProjectReferenceTargets item in project "C:\src\Foo.csproj"
- the reference was called with global properties that do not match the static graph inferred nodes
- the reference was not explicitly specified as a ProjectReference item in project "C:\src\Foo.csproj"
https://github.com/dotnet/msbuild/blob/main/documentation/specs/static-graph.md#examples is missing instructions for SDK owners.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Microsoft.Testing.Extensions.CodeCoverage.targets path shown in the error and read the linked MSBuild static-graph specification, especially its examples. Reproduce an MTP build using /isolate and determine what support is missing for the InitializeSourceRootMappedPaths target. Done means the isolated build no longer reports MSB4252.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100