installer icon indicating copy to clipboard operation
installer copied to clipboard

Ordering of PlatformAssemblyPaths passed to crossgen is wrong

Open bekir-ozturk opened this issue 5 years ago • 4 comments

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.

bekir-ozturk avatar Mar 20 '20 16:03 bekir-ozturk

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.

ericstj avatar Mar 20 '20 22:03 ericstj

Old issue triage: @ericstj is this still something we should look at? It doesn't look like it was ever done.

marcpopMSFT avatar Apr 23 '24 20:04 marcpopMSFT

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.

ericstj avatar Apr 24 '24 17:04 ericstj

@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.

marcpopMSFT avatar Apr 30 '24 20:04 marcpopMSFT

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.

ivdiazsa avatar May 01 '24 16:05 ivdiazsa