Microsoft.Testing.Extensions.CodeCoverage does not support MSBuild isolation

Open
#205 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp
Domain
build-system

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.

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.

Dominant language
C#
Stars
125
Forks
17
Avg merge
1h 17m
Merged PRs (30d)
2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/codecoverage

All issues in microsoft/codecoverage

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.