-
Notifications
You must be signed in to change notification settings - Fork 692
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
Detect sandboxed assembly load in NuGet, warn about required action #4461
Conversation
5a96d6b
to
5702e8f
Compare
@@ -5433,4 +5433,7 @@ Please consider migrating '{0}' to `PackageReference` and using the pack targets | |||
You can set the '{1}' environment variable to 'true' to temporarily reenable this functionality.</value> | |||
<comment>Please do not localize `project.json` pack and `PackageReference`. 0 - path, 1 - env var name</comment> | |||
</data> | |||
<data name="Error_NuGetExeNeedsToBeUnblockedAfterDownloading" xml:space="preserve"> | |||
<value>NuGet.exe file on path {0} needs to be unblocked after downloading : {1}</value> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JonDouglas @NuGet/nuget-client
Currently path to nuget.exe included 2 times, most likely we just need one, but couldn't decide which one to keep. Please advise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The path should be the executing .exe path. I can't honestly tell from this screenshot. They look the same just that the C:\
path is the more empowering one for the user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I meant to leave a comment yesterday, but appareently it stayed in pending.
f5702fb
to
a39b418
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. 👏
You probably need to rebase.
3301e43
to
b4281bd
Compare
@NuGet/nuget-client |
Bug
Fixes: NuGet/Home#9954
Regression? Last working version:
Description
Net framework sandboxing causing hard to reason error for nuget.exe downloaded from internet on Windows OS. Now error is very explicit and clear, added exception handler and new NU5133 error to inform customer about need to unblock nuget.exe.
Adding unit test little bit complicated so I didn't do it, but manually tested it.
Test nuget.exe can be found here, please note it's not MS authenticode signed so ask additional permission when download.
Before:
After:
Before:
After:
Error message can be improved, please give your feedback.
PR Checklist
PR has a meaningful title
PR has a linked issue.
Described changes
Tests
Documentation