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

Set EnableWindowsTargeting to true when updating the lock file #11037

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

na1307
Copy link
Contributor

@na1307 na1307 commented Dec 2, 2024

What are you trying to accomplish?

I'm trying to prevent the lock file update from failing when updating NuGet packages for Windows specific projects.

Fix #11036

Anything you want to highlight for special attention from reviewers?

No

How will you know you've accomplished your goal?

Added -p:EnableWindowsTargeting=true to dotnet restore command. This prevents dotnet cli from failing when restoring Windows specific projects.

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.

@na1307 na1307 requested a review from a team as a code owner December 2, 2024 12:30
@github-actions github-actions bot added the L: dotnet:nuget NuGet packages via nuget or dotnet label Dec 2, 2024
@JamieMagee
Copy link
Contributor

Are there any downsides to optimistically setting this property? This is the only documentation I can find on it:

@na1307
Copy link
Contributor Author

na1307 commented Dec 3, 2024

Are there any downsides to optimistically setting this property? This is the only documentation I can find on it:

As far as I know, there isn't any.

@brettfo
Copy link
Contributor

brettfo commented Dec 4, 2024

@na1307 The change looks good and the documentation makes sense. Could you add a unit test verifying the behavior? All CI (and production) runs in a Linux container, so you should get the appropriate behavior.

@na1307
Copy link
Contributor Author

na1307 commented Dec 5, 2024

@na1307 The change looks good and the documentation makes sense. Could you add a unit test verifying the behavior? All CI (and production) runs in a Linux container, so you should get the appropriate behavior.

I know roughly how the tests are written, but I don't know what to do because of the contentHash in the lock file. Should I just use Some.Package like other tests, or should I use an actual existing package?

@na1307
Copy link
Contributor Author

na1307 commented Dec 8, 2024

@brettfo

@na1307
Copy link
Contributor Author

na1307 commented Dec 17, 2024

Why is there still no answer... @brettfo

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.

Lock file update fails if project is windows specific
3 participants