-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
additionalDeps downgrades shared runtime library #3091
Comments
Note that https://github.com/dotnet/core-setup/issues/3546 may help with this feature, as it will pick the "highest" version of each assembly based on new assemblyVersion and fileVersion metadata in the deps.json files. This new feature is supported by the host, but the metadata is not yet being written by the SDK. |
If the additional deps.json do not want to "upgrade" the app or framework versions of the same assemblies, then either they don't add the assemblyVersion\fileVersion metadata to the deps.json, or we change the host to treat additional deps file differently. |
Closing this as addressed by #2994 which is expected to be in by 2.1 release. |
But is it addressed? As you said there |
The PR has not yet been pushed: dotnet/sdk#2118 When this is in, and the framework deps.json file is generated with version numbers, I will verify the behavior. The fx will "win" over any app or additional deps.json file that doesn't have version numbers, or have older version numbers. |
What about |
I see. I was thinking this was a minor roll-forward. Re-opening. If we change this behavior for additional-deps (assuming for both folder-version and individual deps modes), wouldn't that be considered a breaking change? Would additional-deps ever want to override (either upgrade or downgrade) the framework's versions? |
Upgrades are semi-fine, but having additional deps downgrade anything at all is a recipe for disaster. |
@pakrym shouldn't the versions in the additional-deps (in the folder hierarchy with a "2.1.x" folder) be the same (or newer) than the framework version they targeted? Is the desire to ship the same additional deps for both 2.0.x and 2.1.x? |
Or could the example above target AspNetAll\AspNetApp instead of NetCoreApp (for 2.1 anyway)? |
I understand that the additional-deps may be older than the "found" version of the framework (whether or not it rolled forward on major\minor\patch) because of the proposed roll-backwards functionality, but in this particular example the major.minor of the additional deps is the same as the framework, correct? |
This sample is just a sample, in the real life, it can happen because of 2.0->2.1 roll forward. |
Fixed in release/2.1 in PR dotnet/core-setup#4094. |
Steps to reproduce
dotnet new web
mkdir deps
yourdir\deps\shared\Microsoft.NETCore.App\2.1.0-preview2-26308-01\a.deps.json
(modify runtime framework version to be the one referenced in.dotnet\x64\shared\Microsoft.AspNetCore.App\2.1.0-preview2-xxxxx\Microsoft.AspNetCore.App.runtimeconfig.json
app references)$env:DOTNET_ADDITIONAL_DEPS="yourdir\deps"
Expected behavior
App runs fine because deps file does not override app
Actual behavior
App crashes with
Because library got resolved to
C:\Program Files\dotnet\store\x64\netcoreapp2.1\microsoft.aspnetcore.hosting.abstractions\2.0.0\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.dll
Environment data
Confirmed on hostxr built from latest
preview/2.1
source and2.1.0-preview2-26314-02
@steveharter
/cc @glennc @muratg
The text was updated successfully, but these errors were encountered: