-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Multi-target all shared framework projects with netcoreapp3.1 #17998
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
Conversation
Http.Features was already doing this but was still affected? |
That one is a little more special since it involves a problem with Identity.UI which invokes razor compile in a non-standard method without our custom ref assembly substitution logic and therefore resolves the implementation assemblies. There are quite a few oddities with our builds in this area and I'd like to see this cleaned up a little more due to how fragile it is. |
@@ -2,7 +2,7 @@ | |||
|
|||
<PropertyGroup> | |||
<Description>ASP.NET Core utilities for key derivation.</Description> | |||
<TargetFrameworks>netstandard2.0;netcoreapp2.0</TargetFrameworks> | |||
<TargetFrameworks>netstandard2.0;netcoreapp2.0;netcoreapp3.0</TargetFrameworks> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to remove netcoreapp2.0
from this? I don't remember the context: Why target the older TFM?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would that be considered a breaking change? I don't know if that would be able to make a change such as modifying a TFM in servicing but we have said that adding an additional TFM is allowed in the past.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I unfortunatley agree removing 'netcoreapp2.0' would be considered a breaking change. But, I'd still like to understand why the project targets the older TFM in the first place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My guess would be that we just overlooked it? We don't work with this package often. It is strange that we didn't automatically update the TFM to the latest though.
Maybe we should follow up in 5.0 to remove the previous TFM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds reasonable. Please file a follow-up issue or open a PR proactively.
@@ -2,7 +2,7 @@ | |||
|
|||
<PropertyGroup> | |||
<Description>ASP.NET Core utilities for key derivation.</Description> | |||
<TargetFrameworks>netstandard2.0;netcoreapp2.0</TargetFrameworks> | |||
<TargetFrameworks>netstandard2.0;netcoreapp2.0;netcoreapp3.0</TargetFrameworks> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds reasonable. Please file a follow-up issue or open a PR proactively.
968fcc5
to
5a9c484
Compare
@Pilchie this PR is ready to go other than the servicing-consider label. Has it been discussed in Tactics? |
It hasn't. We should probably send mail. Also, reconcile it with the guidance in the Versioning spec I mailed yesterday to ensure that things look right. |
@JunTaoLuo stick w/ the last two branding changes. I'll add the ask-mode template to this PR and forward to Tactics. Will keep you in the loop. |
W.r.t. the versioning doc, we have not made changes here or elsewhere to address
For what we ship as packages:
This is true w/ this PR but is specific to |
🆙📅 to include ask-mode template. Email sent to Tactics. |
Thanks @JunTaoLuo❕ |
From above:
Now that we have the doc, we should probably sit down and enumerate exactly where we don't follow it and make a plan for whether/when/how to address violations, and add more clarifications to the doc. @ericstj @nguerrera - does the above sound right to you? |
Without this change, we are still compiling against implementation assemblies in some cases. Based on our current understanding, the problem affects assemblies which are included in the shared framework but are built only for
netstandard2.0
ornetstandard2.1
TFMs. Due to our current logic, we only compile against ref assemblies which are built for thenetcoreapp3.1
TFM. This PR resolves the issue by multi-targeting the affected projects.Customer impact
The mix of assembly versions in dependencies leads to assembly load errors at runtime in some cases. See aspnet/Announcements#401 for details.
This is a complement to #17970. The two changes together form a comprehensive fix and make everything consistent.
Regression
No. Problem affects 'release/3.0' as well but probably does not meet the bar for 3.0.3.
Testing
Confirmed Windows x86 and OSX artifacts built in https://dev.azure.com/dnceng/public/_build/results?buildId=478589 use consistent assembly versions in the shared framework.
Risk
Minimal. Testing is conclusive and changes are very focused on the specific issue. This PR primarily changes four src/ projects then reacts to that in the generated ref/ projects.