Add nuget restore to yarn build #15376
Open
+270
−10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Add Nuget restore to yarn build to avoid deadlocks when solution is opened in Visual Studio.
Type of Change
Why
When we open a solution in Visual Studio we often see a deadlock or build breaks.
It makes using RNW code in VS almost impossible.
As described in this PR #15137 the issue is caused by VS not being able to restore NPM packages.
From another hand, the package restore has no issues when we build the same code from MSBuild.
What
This PR addresses the issue by restoring the Nuget packages as a part of the "yarn build".
This way when the solution is opened in VS we do not need to restore Nuget packages anymore and we do not have deadlocks or build breaks.
Changelog
Should this change be included in the release notes: no
Microsoft Reviewers: Open in CodeFlow