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

Fix plugins to make single file assemblies possible #2946

Merged
merged 2 commits into from
Nov 7, 2023

Conversation

gsmachado
Copy link
Contributor

I just changed Assembly.GetEntryAssembly().Location to System.AppContext.BaseDirectory (read more here). This will make possible single file assemblies for Neo Nodes.

Actually, the problem with Assembly.GetEntryAssembly().Location is that it doesn't support single file assemblies introduced in .net 6.

Let me know if you have a better way to do it, please. IMHO, this is already the best way (it was even recommended in this issue).

@gsmachado gsmachado mentioned this pull request Nov 6, 2023
@cschuchardt88
Copy link
Member

Also

The GetEntryAssembly method can return null when a managed assembly has been loaded from an unmanaged application. For example, if an unmanaged application creates an instance of a COM component written in C#, a call to the GetEntryAssembly method from the C# component returns null, because the entry point for the process was unmanaged code rather than a managed assembly.

@Jim8y Jim8y requested a review from shargon November 6, 2023 23:27
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.

4 participants