-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Adding .NET Framework configurations to OOB packages so that they won't require the netstandard shims when targeting .NET Framework #42901
Conversation
@ericstj as you can see from the description above, so far this PR contains the first part of the changes, which include just adding net461 configurations to projects that require it. Now I will work on the next 2 steps. |
src/System.ComponentModel.Composition/ref/System.ComponentModel.Composition.csproj
Outdated
Show resolved
Hide resolved
c22ae9d
to
51d2f8f
Compare
I have now concluded the extensive testing step to ensure that there were no visible API differences between the current latest stable packages and the ones produced by this PR when targeting net461, net462 and net471. I did this by manually comparing the reference asset I was getting out of the package on two projects, one using the latest stable package, and the other one using the one from this PR which would now use the net461 configuration. |
src/System.Security.Cryptography.OpenSsl/ref/System.Security.Cryptography.OpenSsl.csproj
Show resolved
Hide resolved
src/System.Security.Cryptography.OpenSsl/ref/System.Security.Cryptography.OpenSsl.cs
Show resolved
Hide resolved
@@ -2,9 +2,11 @@ | |||
<PropertyGroup> | |||
<PackageConfigurations> | |||
netstandard1.1; | |||
net461; |
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.
Where is the package version change?
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.
This package isn't stable, it has the BlockStable attribute, so I didn't rev it given that we will just be shipping it as another preview. cc: @tannergooding if you guys want me to rev it up, I can do that too.
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.
We shouldn’t even ship it. Won’t have a valid version (-servicing)
src/System.Resources.Extensions/src/System.Resources.Extensions.csproj
Outdated
Show resolved
Hide resolved
9cfa4fe
to
14b5db5
Compare
@ericstj this is now ready to go. When you have time do you mind taking another look? If all looks good then we can go ahead and merge. |
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.
LGTM
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.
LGTM other than one comment about versioning
@@ -19,7 +19,7 @@ internal struct PipeAwaitable | |||
private SynchronizationContext _synchronizationContext; | |||
private ExecutionContext _executionContext; | |||
|
|||
#if !netstandard | |||
#if (!netstandard && !netfx) |
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.
You can use NETFRAMEWORK which is predefined by the SDK:
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/preprocessor-directives/preprocessor-if
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.
Not on release/3.1 at least. Here are the defines I'm getting straight out of the binlog:
,DEBUG,TRACE,netfx;TRACE;RESOURCES_EXTENSIONS;INTERNAL_NULLABLE_ATTRIBUTES;;
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 believe release/3.1 is still in the place where we were not using the actual defines from the SDK yet. dotnet/runtime is different.
cc: @ericstj @Anipik @safern
Fixes dotnet/runtime#1625
Description
This PR will finish the work on the release/3.1 branch that was started with PR #42849 on release/2.1 branch. It is adding .NET Framework configurations to our OOB packages so that they won't require netsandard shims for projects ingesting them and targeting .NET Framework.
Things that need to happen before merging this PR:
Customer Impact
Customers that have hit problems caused by this issue have been trying to add manual workarounds on their projects and custom logic for deploying. Once this is fixed, customers will have to remove those workarounds from their projects and reference the new packages in order to get the benefits of not needing the extra facades or binding redirects for their application.
Regression?
No.
Packaging reviewed?
It will involve packaging changes, so it will require a review by packaging experts.
Risk
Low. We didn't increase Assembly Version in order to not require new binding redirects from apps. The risk here is that we are effectively causing NuGet to use a different asset from the package to pass to the compiler and a different one as well for the implementation, but we did extensive testing to ensure that we were not removing or adding API and that there was no visible difference between the assets that they used to get and the ones they will get now.