microsoft / microsoft/MSBuildSdks

Skipping unsupported projects does not exclude NuGet imports during restore

Open
#448 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Bug
Dominant language
C#
Stars
508
Forks
94
Avg merge
6h 40m
Merged PRs (30d)
2

Description

This new feature breaks the build because GetProjectsToSkip runs before Restore and does not ignore missing imports from packages, causing errors like
error MSB4019: The imported project "C:\msbuild\CompileModule.proj" was not found. Confirm that the expression in the Import declaration "\msbuild\CompileModule.proj" is correct, and that the file exists on disk.
4.0.0 breaks the build, I'm rolling back to 3.1.6

Originally reported at https://github.com/microsoft/MSBuildSdks/issues/438#issuecomment-1546260640

Contributor guide

Open the contributing guide

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.

Research direction

Trace GetProjectsToSkip and its ordering relative to Restore, then reproduce the missing NuGet import error described in the report. Done means unsupported projects with missing package imports are skipped without MSB4019 and restore completes successfully.

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.