-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Use NuGetPackageResolver in InteractiveHost #5356
Conversation
cston
commented
Sep 19, 2015
- Use resolver in InteractiveHost.Service
- Change reference syntax to #r "nuget:name/version"
- Use local cache only for resolving packages
@@ -46,24 +39,26 @@ internal sealed class RuntimeMetadataReferenceResolver : MetadataReferenceResolv | |||
|
|||
public override ImmutableArray<PortableExecutableReference> ResolveReference(string reference, string baseFilePath, MetadataReferenceProperties properties) | |||
{ | |||
if (PathResolver != null && PathUtilities.IsFilePath(reference)) | |||
if (PackageResolver != null) |
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.
I think it would be clearer to parse up front and then try either nuget resolution or file resolution. Consider adding a TryParse method that returns a refined string to be passed to ResolveNuGetPackage
.
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.
Added.
Can one of the admins approve this PR test or whitelist this user? ('@dotnet-bot add to whitelist' to whitelist, '@dotnet-bot okay to test' to accept for PR, '@dotnet-bot test this please' to retest. Case sensitive). |
@dotnet-bot retest this please |
Just curious; Why is the package version required? |
@khellang The package version should be optional. We'll remove the version requirement in a separate PR. |
Agreed. Awesome 👍 |
Use NuGetPackageResolver in InteractiveHost - Use resolver in InteractiveHost.Service - Change reference syntax to #r "nuget:name/version" - Use local cache only for resolving packages