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

Using the library in MacOs project #285

Open
klioqc opened this issue Aug 7, 2023 · 0 comments
Open

Using the library in MacOs project #285

klioqc opened this issue Aug 7, 2023 · 0 comments
Labels
question Further information is requested

Comments

@klioqc
Copy link

klioqc commented Aug 7, 2023

Hello,
I am trying to use this library in the project with
net6.0-macos
It fails with the error
Dependency resolution failed for component [...] with error code -2147450750. Detailed error: Hostpolicy must be initialized and corehost_main must have been called before calling corehost_resolve_component_dependencies
This happens on this call
_dependencyResolver = new AssemblyDependencyResolver(mainAssemblyPath);
here

I found a description for this problem in the Xamarin GitHub [System.Runtime.Loader.AssemblyDependencyResolver doesn't work in macOS(https://github.com/xamarin/xamarin-macios/issues/15685)
and they write they are not going to do anything.

Is there a way to avoid this class instantiation? I looked into AssemblyLoadContext config setting but it does not allow to avoid that resolver instantiation.

@klioqc klioqc added the question Further information is requested label Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant