Skip to content
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

[Release/2.0.0] Reduce desktop targeted reference assemblies in 2.0 release #23462

Closed
ericstj opened this issue Sep 6, 2017 · 5 comments
Closed

Comments

@ericstj
Copy link
Member

ericstj commented Sep 6, 2017

See https://github.com/dotnet/corefx/issues/23505.

The use of reference assemblies in 2.0 for desktop-targeted packages and netstandard support targets has resulted in a number of tooling issues.

To help relieve these, we can dial back the number of reference assemblies we use.

  1. Don't use reference assemblies at all for the support package / targets.
  2. For packages which have reference facades which are full facades, don't set the reference assembly bit.
    • Remove reference assembly attribute from partial ref facade when it is a full facade buildtools#1663
    • Needs to be ported to release/2.0.0
    • The following packages will benefit from this:
      • Microsoft.Win32.Registry
      • System.CodeDom
      • System.ComponentModel.Annotations
      • System.Configuration.ConfigurationManager
      • System.Data.SqlClient
      • System.IO.Packaging
      • System.IO.Ports
      • System.Security.AccessControl
      • System.Security.Cryptography.Cng
        • for all but net461 see below
      • System.Security.Cryptography.Pkcs
      • System.Security.Cryptography.ProtectedData
      • System.Security.Cryptography.Xml
      • System.Security.Principal.Windows
      • System.ServiceProcess.ServiceController
      • System.Threading.Tasks.Extensions
  3. For the remaining packages, consider excluding the desktop reference and instead using the implementation assembly as the reference (as we did in 1.x). These are the packages we shipped in 2.0 that contained reference assemblies with typedefs for desktop:
    • System.Numerics.Vectors
    • System.IO.FileSystem.AccessControl
    • System.IO.Pipes.AccessControl
    • System.Reflection.TypeExtensions
    • System.Security.Cryptography.Cng
      • only on net461 as a result of the netstandard remapping. Fix here is to drop those types from the reference for the netfx build.
    • System.Threading.AccessControl

1 is a must-fix for 2.0. For 2 and 3 we'd need to ship the individual packages and for that I'd like a shiproom read.

@ericstj ericstj self-assigned this Sep 6, 2017
@Petermarcu
Copy link
Member

dotnet/corefx#23711

@danmoseley
Copy link
Member

@weshaggard is there any work left here for 2.0.2?

@ericstj
Copy link
Member Author

ericstj commented Oct 5, 2017

We did 1, we were blocked on doing 2 & 3 due to buildtools being in limbo. That's since been fixed. I think we can decide if we want to do 2 & 3 and ship them at some future date (not necessarily in 2.0.2).

@alexdrl
Copy link

alexdrl commented Jan 3, 2018

We're having an issue with a Xamarin project, which as we added System.IO.Packaging 4.4.1 nuget package dependency, the reference is resolved as the ref/netstandard1.3 DLL, a reference assembly. It seems that because of that, the Xamarin app fails to start because this DLL does not get packaged, and so the app fails to start with this common xamarin error https://forums.xamarin.com/discussion/63584/android-could-not-load-assembly-xxx-during-startup-registration

Would be this resolved with this change?

@ericstj
Copy link
Member Author

ericstj commented Mar 8, 2018

@alexdrl that is different. All Xamarin frameworks have their own TFM which differs from desktop.

2 has already happened in 2.1 branch.

I'll open a new issue to track 3.

@ericstj ericstj closed this as completed Mar 8, 2018
@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the 2.0.x milestone Jan 31, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants