Skip to content

Fix no-op issues with SDK resolver#3170

Merged
jeffkl merged 4 commits into
devfrom
dev-jeffkl-sdk-resolver-fix
Jan 9, 2020
Merged

Fix no-op issues with SDK resolver#3170
jeffkl merged 4 commits into
devfrom
dev-jeffkl-sdk-resolver-fix

Conversation

@jeffkl
Copy link
Copy Markdown
Contributor

@jeffkl jeffkl commented Dec 17, 2019

Bug

Fixes: NuGet/Home#8692
Fixes: dotnet/runtime#949
Regression: No

  • Last working version:
  • How are we preventing it in future:

Fix

  • Fixes the issue with the SDK resolver where its called twice at the same time and it tries to write a dgspec file twice. This was caused by the static singleton used for the project name. I'm now generating an entire unique folder and unique project name per restore to ensure this doesn't happen again.
  • Disabled no-op for SDK restore
  • In the event of an unhandled exception, log the full stack trace instead of just the message

Testing/Validation

Tests Added: No
Reason for not adding tests: Not needed
Validation: Manual

Comment thread src/NuGet.Core/NuGet.Commands/RestoreCommand/Utility/NoOpRestoreUtilities.cs Outdated
Comment thread src/NuGet.Core/Microsoft.Build.NuGetSdkResolver/RestoreRunnerEx.cs Outdated
jeffkl added 4 commits January 9, 2020 13:24
* Fixes the issue with the SDK resolver where its called twice at the same time and it tries to write a dgspec file twice.  This was caused by the static singleton used for the project name.  I'm now generating an entire unique folder and unique project name per restore to ensure this doesn't happen again.
* Disabled no-op for SDK restore
* Fix code path when no-op is disabled to fully disable no-op logic
…cs and src/NuGet.Core/NuGet.Commands/RestoreCommand/Utility/NoOpRestoreUtilities.cs
@jeffkl jeffkl force-pushed the dev-jeffkl-sdk-resolver-fix branch from 507931b to c4ff867 Compare January 9, 2020 21:24
@jeffkl
Copy link
Copy Markdown
Contributor Author

jeffkl commented Jan 9, 2020

@nkolev92 do you approve of this PR?

Copy link
Copy Markdown
Member

@nkolev92 nkolev92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢 :shipit: 💯

@jeffkl jeffkl merged commit 74d1935 into dev Jan 9, 2020
@jeffkl jeffkl deleted the dev-jeffkl-sdk-resolver-fix branch January 9, 2020 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nuget.dgspec.json "in use" error during build restore fails when nuget.dgspec.json is "used by another process"

3 participants