-
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
Expose missing references which are present in the runtime and in packages in the targeting pack #54147
Expose missing references which are present in the runtime and in packages in the targeting pack #54147
Conversation
Tagging subscribers to this area: @Anipik, @safern, @ViktorHofer Issue DetailsThe platform analyzers warns for usages of APIs which aren't available The big benefit of doing so is that customers don't need to reference For more in-depth reasoning, see the detailed summary: Update depents by referencing the latest available package. Making sure Fixes #53892
|
@@ -22,7 +22,9 @@ name switch | |||
"urn:mpeg:mpeg21:2003:01-REL-R-NS:licenseTransform" => new XmlLicenseTransform(), | |||
"http://www.w3.org/2000/09/xmldsig# X509Data" => new KeyInfoX509Data(), | |||
"http://www.w3.org/2000/09/xmldsig# KeyName" => new KeyInfoName(), | |||
#pragma warning disable CA1416 // This call site is reachable on all platforms. 'DSAKeyValue' is unsupported on: 'ios', 'maccatalyst', 'tvos' |
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.
Started an offline thread with @buyaa-n @GrabYourPitchforks and @bartonjs to figure out what to do about this and the other exclusion in SignedXmlDebugLog.cs (change below).
@ViktorHofer the Microsoft.AspNetCore.App.Ref package and our targeting packs contain Microsoft.Win32.Registry, System.Security.AccessControl, and System.Security.Principal.Windows. We also reference all but the System.Security.AccessControl package in a few projects. To confirm: Once this is in and Maestro++ updates us to a build containing it,
/cc @dotnet/aspnet-build |
@@ -158,6 +160,7 @@ | |||
<Reference Include="System.ComponentModel.TypeConverter" /> | |||
<Reference Include="System.Diagnostics.Debug" /> | |||
<Reference Include="System.IO.FileSystem" /> | |||
<Reference Include="System.IO.FileSystem.AccessControl" Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))" /> |
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.
Instead of adding this verbose condition to each item, can we group them in a shared itemgroup where the condition is set to the whole itemgroup?
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.
These will go away in 4-5 months when we target NET7 so I don't care much about the added verbosity. Let's keep it as is meanwhile.
src/libraries/pkg/Microsoft.Windows.Compatibility/Microsoft.Windows.Compatibility.pkgproj
Outdated
Show resolved
Hide resolved
e23b794
to
256ead6
Compare
Yes, the assemblies which are now part of the Microsoft.NETCore.App.Ref targeting pack shouldn't be exposed in aspnetcore's and windowsdesktop's targeting pack anymore.
Exactly. Conflict resolution will trim the reference assembly that comes from the package away anyway but removing the now unnecessary PackageReferences from project files reduces complexity and restore time. |
The platform analyzers warns for usages of APIs which aren't available on specific platforms. Exposing the missing reference assemblies which are already part of the runtime pack in the targeting pack. The big benefit of doing so is that customers don't need to reference the corresponding packages to target these APIs and that these five packages can be dead-ended. For more in-depth reasoning, see the detailed summary: dotnet#53892 (comment) Fixes dotnet#53892
Update depents by referencing the latest available package. Making sure that packages are never used on NetCoreAppCurrent by applying .NETCoreApp version conditions.
dd31634
to
c549d96
Compare
src/libraries/System.Security.Cryptography.Xml/src/System.Security.Cryptography.Xml.csproj
Show resolved
Hide resolved
<Dependency Include="@(ExternalLibraryPackage)"> | ||
<TargetFramework>netstandard2.1</TargetFramework> | ||
</Dependency> | ||
<Dependency Include="@(ExternalLibraryPackage)" |
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.
Do net6.0 need ExternalLibraryPackage
in it's dependency group?
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.
Other than one question, LGTM. Thank you :)
@ericstj I contacted both here in the PR and via mail. We are following up offline. |
- remove newly-unnecessary package references - do not expect affected assemblies in _our_ targeting packs
- remove newly-unnecessary package references - do not expect affected assemblies in _our_ targeting packs
…/efcore (#33571) [release/6.0-preview6] Update dependencies from dotnet/runtime dotnet/efcore - React to dotnet/runtime#54147 - remove newly-unnecessary package references - do not expect affected assemblies in _our_ targeting packs - Add baseline suppression - !fixup! Suppress correct reference - Omit System.Security.Permissions. dotnet/runtime#54341 System.Security.Permissions is brought in by System.Security.Cryptography.Xml for netstandard2.0 compatibility but not required in net6.0 since the types required exist in System.Security.AccessControl - Permit PackageReferences from ref/runtime-pack - Fix Permissions version reference and delete dead packages - More dead package cleanup - Try again at transitioning dead-end package to 5.0 version - Fix up version of added package - Fix PackageReference from DataProtection -> Registry This was present in the previous release and shouldn't be removed since this is part of the public contract of the netstandard2.0 build of DataProtection. - Apply suggestions from code review Co-authored-by: Doug Bunting <6431421+dougbu@users.noreply.github.com> - Get System.Security.Permissions refs working - Update src/DataProtection/DataProtection/src/Microsoft.AspNetCore.DataProtection.csproj - Suppress all of System.Security.Permissions dependency closure - Add missing dependencies
[main] Update dependencies from dotnet/runtime dotnet/efcore - React to dotnet/runtime#54147 - remove newly-unnecessary package references - do not expect affected assemblies in _our_ targeting packs - Add baseline suppression - !fixup! Suppress correct reference - Manually align w/ #33571 - add excluded System.Security.Permissions references - stop auto-updating dead-ended packages - switch to 5.0.0 version of Microsoft.Win32.Registry - switch to 5.0.0 version of System.Security.Principal.Windows - Suppress all of System.Security.Permissions dependency closure - cherry-picked from #33571 - Add missing dependencies - cherry-picked from #33571
The platform analyzers warns for usages of APIs which aren't available
on specific platforms. Exposing the missing reference assemblies which
are already part of the runtime pack in the targeting pack.
The big benefit of doing so is that customers don't need to reference
the corresponding packages to target these APIs and that these five
packages can be dead-ended.
Affected packages:
For more in-depth reasoning, see the detailed summary:
#53892 (comment)
Update depents by referencing the latest available package. Making sure
that packages are never used on NetCoreAppCurrent by applying
.NETCoreApp version conditions.
Fixes #53892
I will send out a notice to the affected upstream repos windowsdesktop and aspnetcore after this is merged so that they can remove the references from their targeting packs. cc @dougbu @RussKie