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

Improve on Assembly loading to support finding the best matching assembly for the RID (Runtime Identifier) expected #243

Open
einari opened this issue Jul 8, 2019 · 0 comments
Labels

Comments

@einari
Copy link

einari commented Jul 8, 2019

In AssemblyContext we have our OnResolve() method, it delegates to a private method for getting a CompileLibrary to work with. This can come from either RuntimeLibraries on the DependencyContext or from the CompileLibraries. For a RuntimeLibrary, it has a RuntimeAssemblyGroups property we look into for getting the actual path to the runtime assembly to use. This is right now just assuming the first assembly - which could potentially be for the wrong target platform running.

The thing is that the runtime assemblies could be specific for the target platform, and not just Any platform. Which suggests that if the first assembly is a unix assembly, then this won't work on Windows for instance.

Read more here:
https://github.com/dotnet/corefx/blob/master/pkg/Microsoft.NETCore.Platforms/readme.md

Here is the Runtime identifier catalog:
https://docs.microsoft.com/en-us/dotnet/core/rid-catalog

We should based on the current running operating system determine which runtime identifier is the appropriate and select it. This needs to consider the hierarchy and inheritance.
Have a look at the runtime.json to get an idea.

image

This also applies to the Assets path being handed in as paths as well.

┆Issue is synchronized with this Asana task

@einari einari added the bug label Jul 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant