-
Notifications
You must be signed in to change notification settings - Fork 5k
Native DLL load prefers app local over framework irrespective of file version #1459
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
Comments
This has been discussed before: https://github.com/dotnet/core-setup/issues/4435 The main problem is determining file versions on Linux. If we can solve that problem in the SDK (and write those versions into the .deps.json) then solving the host/runtime becomes just a technical problem. The fix is non-trivial though, unfortunately the host/runtime interface makes this really hard today (we would have to change how it works). |
Great point about Linux. Is there even anything we could sniff from the .so/.dylib files? If not, we could maybe introduce a way for a nuget package to say "asset X has version Y" and rely on correct package authoring. |
Nothing reliably. I do not think we want to be in the business of version unification of unmanaged libraries. It is a very complex problem, very niche scenario, and differs from OS to OS. If folks want to make a roll forward like this work, they need to design for it without the SDK/platform help. For example, I believe that the ASP.NET could have solved the problem by renaming the unmanaged .dll as it was moved inbox. |
@jkotas That's reasonable. I imagined it might come down to that in dotnet/aspnetcore#17957 (comment)
I, for one, could live with the resolution here being "by design" or "won't fix", particularly if we can capture appropriate guidance to avoid having it matter for framework authors. @Pilchie this would be something to add to the list that we've started working on in that case. |
Due to lack of recent activity, this issue has been marked as a candidate for backlog cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process. This process is part of our issue cleanup automation. |
This issue will now be closed since it had been marked |
Uh oh!
There was an error while loading. Please reload this page.
It appears the host/runtime will prefer an app local native dll over a framework native dll, irrespective of the native dll file version. This could break app roll forward if the roll forward takes the app from a framework that did not have a native dll inbox to one that does. Or from one that had an older version than a package used by the app to one that has a newer version.
Repro steps
NOTE: These are effectively the conditions that reproduce dotnet/aspnetcore#17973
Although the first layer, more urgent issue is that there is a missing entry in the platform manifest, which is being fixed as we speak, I believe there's a second layer issue that is turning the symptom of that from an extra file in the app dir to a crash on app startup. The scenario below is therefore contrived, but the roll forward case mentioned above would be a legitimate case where the same sort of conflict could occur.
With .NET Core SDK 3.1.100 and VS 16.4 installed:
Expected result
App runs fine
Actual result
If you debug, you can see that aspnetcorev2_inprocess.dll has been loaded from the app directory instead of the framework directory
This, despite the framework Microsoft.AspNetCore.App.deps.json having:
And the repro,deps.json having:
cc @vitek-karas @ericstj
The text was updated successfully, but these errors were encountered: