-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Ensure Microsoft.NETCore.App is an implicit dependency for publish. #2881
Ensure Microsoft.NETCore.App is an implicit dependency for publish. #2881
Conversation
Marking WIP as this needs approval. @livarcocc I'm not marking this or the original issue as servicing consider until the fix is reviewed and we're happy with it. |
I did not review in detail, but can we not consider that there is an implicit dependency from Microsoft.AspNetCore.App to Microsoft.NETCore.App? I don't understand why this requires hard-coding of file versions, etc. |
This commit ensures that we exclude files from the `Microsoft.NETCore.App` platform library on publish when the platform library is `Microsoft.AspNetCore.App`, which doesn't have an explicit dependency on `Microsoft.NETCore.App`. When publishing a 2.x ASP.NET application, the `MicrosoftNETPlatformLibrary` property gets changed by ASP.NET to `Microsoft.AspNetCore.App`. This causes the task responsible for determining what files to copy locally to treat files from `Microsoft.NETCore.App` and its dependencies as not being part of the platform. However, when publishing the application as framework-dependent, almost all the platform files get excluded thanks to conflict resolution which has the files as part of the platform manifest and preferred packages. Unfortunately, the apphost, hostpolicy, and hostfxr files are not part of these lists and as a result will be copied locally. This breaks framework-dependent apphost activation because hostfxr and hostpolicy are copied locally. Additionally, these files end up in the deps.json file which also prevents roll-forward activation if the two files are manually deleted. The fix is to treat `Microsoft.NETCore.App` as an implicit dependency of `Microsoft.AspNetCore.App` where we calculate the list of excluded packages for a framework-dependent publish. Fixes dotnet/cli#10602.
e210d39
to
db1d373
Compare
… lib names. This commit treats `Microsoft.NETCore.App` as an implicit dependency for any platform library name, allowing the fix to work for both `Microsoft.AspNet.App` and `Microsoft.AspNet.All`.
@peterhuene let me know when this is ready for shiproom. |
@livarcocc I think it's ready. I'll try to be available for the next shiproom to help defend, but I may have to do so from my TEALS class. |
@peterhuene don't worry. I will talk to you tomorrow morning and get the information I need. Don't worry about it when you are in class. |
This has been approved but is waiting for the branch to open for the appropriate release before merging. |
As the 2.2.1xx branch is now open for the next release, I'm merging this. |
….10 (dotnet#2881) - Microsoft.DotNet.Cli.Runtime - 3.1.100-preview1.19463.10
This commit ensures that we exclude files from the
Microsoft.NETCore.App
platform library on publish when the platform library is
Microsoft.AspNetCore.App
, which doesn't have an explicit dependency onMicrosoft.NETCore.App
.When publishing a 2.x ASP.NET application, the
MicrosoftNETPlatformLibrary
property gets changed by ASP.NET to
Microsoft.AspNetCore.App
. This causesthe task responsible for determining what files to copy locally to treat files
from
Microsoft.NETCore.App
and its dependencies as not being part of theplatform.
However, when publishing the application as framework-dependent, almost all the
platform files get excluded thanks to conflict resolution which has the files
as part of the platform manifest and preferred packages. Unfortunately, the
apphost, hostpolicy, and hostfxr files are not part of these lists and as a
result will be copied locally.
This breaks framework-dependent apphost activation because hostfxr and
hostpolicy are copied locally. Additionally, these files end up in the
deps.json file which also prevents roll-forward activation if the two files are
manually deleted.
The fix is to treat
Microsoft.NETCore.App
as an implicit dependency ofMicrosoft.AspNetCore.App
where we calculate the list of excluded packages fora framework-dependent publish.
Fixes dotnet/cli#10602.