Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Adding .NET Framework configurations to OOB packages so that they won't require the netstandard shims when targeting .NET Framework #42901

Merged
merged 8 commits into from
Apr 14, 2020

Conversation

joperezr
Copy link
Member

@joperezr joperezr commented Apr 8, 2020

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:

  • Add Net461 configurations to all projects that today ship as NuGet packages and have a .NET Standard asset when consumer targets .NET Framework 4.6.1/4.6.2/4.7/4.7.1/4.7.2/4.8. (This will be done with the first commit, so that it is easier to review this commit by commit.)
  • Add Net461 configuration to OpenSSL OOB package which also needs it, but it will be treated specially given that it requires some special types in S.S.C.Algorithms that are not present in 461. (Done with commit 10df782)
  • Baseline all of the packages that have new configurations from steps 1 and 2, and now service all packages above that depend on them so that all new package versions will depend on these new packages that have the new configs. After doing this, all of our latest NuGet packages should not require the .NET Standard shims. (Done with 14b5db5)
  • Do some extensive testing to make sure API wasn't regressed by adding these new configurations. (I have more info on how I did this here Adding .NET Framework configurations to OOB packages so that they won't require the netstandard shims when targeting .NET Framework #42901 (comment)).

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.

@joperezr
Copy link
Member Author

joperezr commented Apr 8, 2020

@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.

@joperezr joperezr requested review from ericstj and safern April 8, 2020 18:26
@joperezr
Copy link
Member Author

joperezr commented Apr 9, 2020

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.

@joperezr
Copy link
Member Author

joperezr commented Apr 9, 2020

@bartonjs PTAL when you have time to commit 10df782

@@ -2,9 +2,11 @@
<PropertyGroup>
<PackageConfigurations>
netstandard1.1;
net461;
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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)

@joperezr
Copy link
Member Author

@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.

@joperezr joperezr added Servicing-consider Issue for next servicing release review Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Apr 13, 2020
Copy link
Member

@safern safern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@Anipik Anipik left a 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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

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;;

Copy link
Member Author

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.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
area-Infrastructure Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants