Skip to content
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

Plugin dll load method change. (2x) #810

Merged
merged 2 commits into from
Jun 11, 2019
Merged

Plugin dll load method change. (2x) #810

merged 2 commits into from
Jun 11, 2019

Conversation

Ashuaidehao
Copy link
Contributor

Currently neo load plugin dll file directly, which will lock dll files and result in "uninstall" command fails.
So I change load method to load a copied dll file to resolve this issue.

Copy link
Member

@vncoelho vncoelho left a comment

Choose a reason for hiding this comment

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

Please wait until I test this.

@vncoelho
Copy link
Member

Versions of neo-plugins are latests neo-plugins are different, 2.10.2.0 and 2.10.2.1.

Fell free to merge @shargon , we need another PR for extra adjustments, maybe neocli should optionally read both: plugin name and, optionally, version

@@ -97,7 +97,8 @@ internal static void LoadPlugins(NeoSystem system)
if (!Directory.Exists(pluginsPath)) return;
foreach (string filename in Directory.EnumerateFiles(pluginsPath, "*.dll", SearchOption.TopDirectoryOnly))
{
Assembly assembly = Assembly.LoadFile(filename);
var file = File.ReadAllBytes(filename);
Assembly assembly = Assembly.Load(file);
Copy link
Contributor

Choose a reason for hiding this comment

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

Very interesting solution... since sizes are very low, it shouldn't impact memory.

@vncoelho vncoelho added the Port-to-3.x Feature or PR must be ported to Neo 3.x branch label Jun 11, 2019
@vncoelho vncoelho merged commit 2919886 into neo-project:master-2.x Jun 11, 2019
@vncoelho
Copy link
Member

@Ashuaidehao, could you port this to master branch?

@Ashuaidehao
Copy link
Contributor Author

@Ashuaidehao, could you port this to master branch?

Sure ,I have created another PR(#816) port to master branch.

@shargon shargon changed the title Plugin dll load method change. Plugin dll load method change. (2x) Jun 12, 2019
@lock9 lock9 mentioned this pull request Oct 25, 2019
31 tasks
Thacryba pushed a commit to simplitech/neo that referenced this pull request Feb 17, 2020
* [EN] Sync up with neo-project#809

[EN] Sync up with neo-project#809

* minor update

* fix some
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Port-to-3.x Feature or PR must be ported to Neo 3.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants