-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Convert C# Reference Assembly Generation to Use GenAPI #932
Comments
If this is the only thing blocking, would it not just be feasible to log an ask on Roslyn to allow this to be configured (that is, to not emit internals to the reference assembly if IVTs are enabled)? As much as having those internals is non desirable, it is very easy (especially when using new language features) to deviate from what Roslyn considers to be part of the public surface area (and therefore to break downstream consumers who may be dependent on that). |
Also CC. @ericstj |
I don't know if Roslyn can turn around a feature request for us in <2 weeks... we may want to use GenAPI for now and see if a future Roslyn feature can be adopted. We need to use GenAPI anyway because Roslyn is not a magic-bullet for WPF (because of C++/CLI). |
Probably not at this moment. |
I agree, we can pivot back to using Roslyn generated C# ref assemblies when the ability for configuration exists, but for now GenAPI seems like the fastest path toward Preview 7. |
Right, and I wasn't meaning to suggest that using GenAPI temporarily for C# code is a bad thing. I just want to ensure that:
I think it would be generally beneficial to log an issue on https://github.com/dotnet/roslyn/issues tracking the issue here. |
@tannergooding Thanks, I filed an issue for some way of excluding internal surface area from generated reference assemblies. |
Currently building ref assemblies for all C# projects (that require it). Working branch is https://github.com/dotnet/wpf/tree/dev/roladuca/genapics |
Currently, C# assemblies are building reference assemblies via ProduceReferenceAssembly (corresponding to the CSC flag -refout).
This causes several issues:
InternalsVisibleTo
in many of its assemblies.Currently, the known dangling references are in the
PresentationCore
andPresentationFramework
reference assemblies, the later only whenPresentationUI
's reference assembly is removed.To fix these, we want to switch to using the GenAPI tool so that we can tailor the content of the reference assemblies to only contain necessary API surface area.
Our builds directly use
ProjectReference
for needed assemblies that are in the same repository and will alter these for those that are not available in the same repository (via WpfProjectReference.targets). We likely will have to update this mechanic if internal building assemblies require internals from the reference assemblies.PresentationCore
's reference assemblyThe text was updated successfully, but these errors were encountered: