installer
installer copied to clipboard
Ordering of PlatformAssemblyPaths passed to crossgen is wrong
During build, crossgen is being passed some folders which are checked for dll files during dependency resolution. Instead of giving priority to rid-specific folders, PlatformAssemblyPaths is sorted alphabetically.
https://github.com/dotnet/core-sdk/blob/7f8787c08008739b533869f417e99935eddd75e7/src/redist/targets/Crossgen.targets#L127
We should sort RemainingFolders so that crossgen resolves dependencies in the same way that the runtime does.
Another thing to consider is to prefer the directory next to the lib you are cross-gen'ing, I think that would have also fixed this particular issue.
Old issue triage: @ericstj is this still something we should look at? It doesn't look like it was ever done.
This bug was about cross-gen being given the "wrong" dependency when crossgening an assembly. In this case wrong meant lower version so it caused a failure.
I think that cross-gen avoids inlining any implementation across modules. As such, using the wrong assembly might not be a problem so long as it still has all the same public surface area and doesn't create a failure. It might not be a priority to fix. I'd defer to @dotnet/crossgen-contrib on that call though.
@dotnet/crossgen-contrib let us know if we should keep this around. If we don't get a reply by next triage, we will close it.
Closing since this issue hasn't caused any problems in the past 4 years. We currently have no budget to spare to investigate it. If it becomes an issue again, we can reopen and reprioritize accordingly to look at it.