-
-
Notifications
You must be signed in to change notification settings - Fork 192
[Experimental] NuGet Dependency Resolver for Plugins #1012
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
Conversation
mind elaborate? there is already an option to put dependencies in the |
Yeah sure, by design plugin dependencies (like NuGet packages) can already be resolved by copying them into the This NuGet resolver doesn't replace the |
Here is real use case issue: When a plugin references a NuGet package that isn't copied yet into the This problem is fully reproducible with Similar issues: natemcmaster/DotNetCorePlugins#294 ![]() |
Sorry for the delay in reviewing this one. Would you be able to add the new config section to the example.json and also the documentation for core config? |
Yes, sure |
@roflmuffin I've added some documentation for this feature. Let me know if it meets your needs |
@dxqwww Can you either allow contributors to edit this branch or pull latest main into your branch to allow automerge to go through? |
🎉 |
Hello, let me introduce an expiremental plugin dependency resolver to improve how external dependencies are resolved when loading plugins.
Problem
By default,
McMaster.NETCore.Plugins
does not handle scenarios where NuGet packages need to be loaded from a shared/global location. To address this, I implemented a custom resolver that can locate dependencies in the NuGet packages root folder (either from theNUGET_PACKAGES
environment variable or the default.nuget/packages
location).Motivation
Previously, for every plugin that depended on a NuGet package, you had to manually place the assemblies into the
shared
folder. These changes remove that friction by enabling automatic resolution.Configuration
Since this feature is experimental, it is disabled by default.
To enable it, set the following in
core.json
: