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.
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.
This also applies to the Assets path being handed in as paths as well.
In
AssemblyContext
we have ourOnResolve()
method, it delegates to a private method for getting aCompileLibrary
to work with. This can come from eitherRuntimeLibraries
on theDependencyContext
or from theCompileLibraries
. For aRuntimeLibrary
, it has aRuntimeAssemblyGroups
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.
This also applies to the Assets path being handed in as paths as well.
┆Issue is synchronized with this Asana task