Re-enable ItCanTestAMultiTFMProjectWithImplicitRestore after MSBuild revert (msbuild#14349) flows in
- Dominant language
- C#
- Stars
- 3.2k
- Forks
- 1.3k
- PR merge metrics
- PR metrics pending
Description
## Background
The MSBuild change [dotnet/msbuild#14274](https://github.com/dotnet/msbuild/pull/14274) (passing `ExcludeRestorePackageImports=true` during implicit restore, behind change wave 18.10) regressed the test `ItCanTestAMultiTFMProjectWithImplicitRestore` with:
```
NuGet.targets(571,5): error MSB3202: The project file "...\TestLibrary\TestLibrary.csproj" was not found.
```
Root-cause analysis is in dotnet/sdk#55245. The `MultiTFMXunitProject/XUnitProject` test asset intentionally has a nonexistent `` to `TestLibrary.csproj`; restore is supposed to skip it gracefully. Passing `ExcludeRestorePackageImports=true` collapses the restore build configuration and causes the missing project to leak into a NuGet `_GenerateRestoreGraphProjectEntry` MSBuild call that does not set `SkipNonexistentProjects`, so it errors instead of skipping.
## Action taken
The MSBuild change is being reverted in [dotnet/msbuild#14349](https://github.com/dotnet/msbuild/pull/14349). To unblock codeflow in the meantime, `ItCanTestAMultiTFMProjectWithImplicitRestore` has been temporarily disabled.
## What to do here
Re-enable `ItCanTestAMultiTFMProjectWithImplicitRestore` once:
1. dotnet/msbuild#14349 (the revert) is merged, and
2. a new MSBuild build containing the revert has flowed into dotnet/sdk.
The test lives in `test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTestFromCsprojForMultipleTFM.cs`.
Contributor guide
No contributing guide indexed for this repository
Research direction
After dotnet/msbuild#14349 has merged and its build has flowed into dotnet/sdk, open test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTestFromCsprojForMultipleTFM.cs and locate ItCanTestAMultiTFMProjectWithImplicitRestore. First run the targeted test to confirm the reverted MSBuild behavior, then re-enable it and run the test again; done means the test passes with implicit restore.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- build-system, cli, testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100