Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dotnet): Ensure that packages can be updated when referencing .NET workloads #10649

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

jeromelaban
Copy link

@jeromelaban jeromelaban commented Sep 20, 2024

What are you trying to accomplish?

This PR is adding an MSBuild property that will prevent this .NET SDK target to execute in order to continue getting the dependency graph.

Fixes #10117

Anything you want to highlight for special attention from reviewers?

There does not seem to be another way to avoid getting the NETSDK1147 error.

This PR uses two specifics to get around workloads not being installed:

  • It uses DesignTimeBuild to skip the workloads validation
  • It defines a fake TargetPlatformVersion in order for nuget to still consider the platform-specific target frameworks.

How will you know you've accomplished your goal?

Both tests that are added will succeed, as they reference target frameworks that require the use of .NET workloads.

Checklist

  • I have run the complete test suite to ensure all tests and linters pass.
  • I have thoroughly tested my code changes to ensure they work as expected, including adding additional tests for new functionality.
  • I have written clear and descriptive commit messages.
  • I have provided a detailed description of the changes in the pull request, including the problem it addresses, how it fixes the problem, and any relevant details about the implementation.
  • I have ensured that the code is well-documented and easy to understand.

@github-actions github-actions bot added the L: dotnet:nuget NuGet packages via nuget or dotnet label Sep 20, 2024
@jeromelaban jeromelaban marked this pull request as ready for review September 20, 2024 19:38
@jeromelaban jeromelaban requested a review from a team as a code owner September 20, 2024 19:38
@JonDouglas
Copy link

lgtm, @brettfo is there a point of contact who manages the .NET dependabot stuff nowadays? I think Stephen P did last I chatted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: dotnet:nuget NuGet packages via nuget or dotnet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for dotnet project requiring workload installation for builds
2 participants