You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ASPNetCore shared framework pulls in System.Drawing.Common but doesn't use it. #42645
I noticed today that ASPNetCore pulls in System.Drawing.Common. This struck me as odd because I wasn't sure why ASP.NET would need to deal with images. That seems like >1MB of unused code.
Crypto.Xml references System.Security.Permissions for only the Evidencetype. It's exposed in it's public surface area. This type is useless in .NETCore and only used for source compat. This probably should have been omitted from the Crypto.Xml surface area, like we omitted all other uses of Evidence across the stack, however I bet Crypto.Xml was also thought to be legacy due to the spec/security issues with XML encryption. We could push this one type down (and EvidenceBase) to break the dependency between Crypto.Xml and System.Security.Permissions.
System.Security.Permissions references System.Windows.Extensions for only the XamlAccessLeveltype. We could push this one type down to break this dependency. Then Permissions could reference only the assembly lower in the stack.
System.Windows.Extensions references System.Drawing.Common because we pushed types down. We can't break this dependency without making a binary breaking change (old code compiled against System.Windows.Extensions needs to resolve the types which have been moved down).
So we have two options to break dependencies here that involve pushing down tiny types. We should consider doing this in 6.0 to reduce the size of ASPNETCore and pull System.Drawing.Common out of it (as well as S.S.P). We just need to decide where to put these types 🤔
Activity
ericstj commentedon Sep 23, 2020
So it looks like we initially didn't have the dependency from Crypto.Xml to Permissions. It was added here: dotnet/corefx#23417
safern commentedon Sep 23, 2020
We could move:
System.Security.Policy.Evidencedown toSystem.Security.AccessControland we would break this dependency.bartonjs commentedon Sep 24, 2020
EvidenceBase needs to move along with it, but I had just independently come to the same conclusion. It's not a terribly inappropriate place for it.
ericstj commentedon Jan 7, 2021
This just came up and is something we should do, preferably early, in 6.0. Moving types tends to require some babysitting as it flows through repos.
ericstj commentedon Mar 17, 2021
With dotnet/aspnetcore#30968 this is now fixed.
The following assemblies were removed from ASPNETCore.
@Anipik we should remove these from ASP.NET's transport package
Anipik commentedon Mar 19, 2021
sure, let me know if you are not working on this then i can go ahead make the changes
ericstj commentedon Mar 19, 2021
@pranavkm @dougbu is it ok to remove these 4 assemblies from the transport package now?
pranavkm commentedon Mar 19, 2021
Yup. They're gone - aspnet/Announcements#456