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

ToolboxBitmapAttribute no longer supports resource/assembly name Suffixes #8832

Open
eerhardt opened this issue Jun 17, 2021 · 1 comment
Open
Labels
area-System.Drawing System.Drawing issues
Milestone

Comments

@eerhardt
Copy link
Member

eerhardt commented Jun 17, 2021

With dotnet/runtime#22761 and dotnet/corefx#22833, BitmapSelector.Suffix will always be null, with no external way of setting it to anything else.

https://github.com/dotnet/runtime/blob/1306b036c1414afa39608ed8ede24fe003191132/src/libraries/System.Drawing.Common/src/System/Drawing/BitmapSelector.cs#L15-L38

The implementation of the suffix feature tries looking for the following attributes on an assembly:

  1. BitmapSuffixInSameAssemblyAttribute
  2. BitmapSuffixInSatelliteAssemblyAttribute

However, since the Suffix will only ever be null, these attributes have no effect. Even if they are applied to an assembly, since the Suffix will always be null, nothing gets appended to the names:

https://github.com/dotnet/runtime/blob/1306b036c1414afa39608ed8ede24fe003191132/src/libraries/System.Drawing.Common/src/System/Drawing/BitmapSelector.cs#L144-L185

Thus, the originalName is only ever used, and the attributes didn't do anything.

We should either add back support for Suffix here, or we should [Obsolete] these attributes, since they don't do anything.

NOTE: I am removing all this dead code in dotnet/runtime#54364. We can add it back if necessary in the future.

cc @safern @JeremyKuhne

@eerhardt eerhardt added the area-System.Drawing System.Drawing issues label Jun 17, 2021
@ghost
Copy link

ghost commented Jun 17, 2021

Tagging subscribers to this area: @safern, @tarekgh
See info in area-owners.md if you want to be subscribed.

Issue Details

With dotnet/runtime#22761 and dotnet/corefx#22833, BitmapSelector.Suffix will always be null, with no external way of setting it to anything else.

https://github.com/dotnet/runtime/blob/1306b036c1414afa39608ed8ede24fe003191132/src/libraries/System.Drawing.Common/src/System/Drawing/BitmapSelector.cs#L15-L38

The implementation of the suffix feature tries looking for the following attributes on an assembly:

  1. BitmapSuffixInSameAssemblyAttribute
  2. BitmapSuffixInSatelliteAssemblyAttribute

However, since the Suffix will only ever be null, these attributes have no effect. Even if they are applied to an assembly, since the Suffix will always be null, nothing gets appended to the names:

https://github.com/dotnet/runtime/blob/1306b036c1414afa39608ed8ede24fe003191132/src/libraries/System.Drawing.Common/src/System/Drawing/BitmapSelector.cs#L144-L185

Thus, the originalName is only ever used, and the attributes didn't do anything.

We should either add back support for Suffix here, or we should [Obsolete] these attributes, since they don't do anything.

cc @safern @JeremyKuhne

Author: eerhardt
Assignees: -
Labels:

area-System.Drawing

Milestone: -

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged The team needs to look at this issue in the next triage label Jun 17, 2021
eerhardt referenced this issue in eerhardt/runtime Jun 17, 2021
With dotnet#22761 and dotnet/corefx#22833, BitmapSelector.Suffix will always be null. This means this feature is dead code, and users are unable to use it.

Removing this dead code because:

1. It doesn't do anything.
2. It is causing ILLink warnings, and it is easier to delete than to try to address the warnings.

I logged https://github.com/dotnet/runtime/issues/54363 to follow up and either re-implement this feature, or obsolete the attributes that no longer have any effect on the app.
@safern safern removed the untriaged The team needs to look at this issue in the next triage label Jun 17, 2021
@safern safern added this to the Future milestone Jun 17, 2021
eerhardt referenced this issue in dotnet/runtime Jun 21, 2021
With #22761 and dotnet/corefx#22833, BitmapSelector.Suffix will always be null. This means this feature is dead code, and users are unable to use it.

Removing this dead code because:

1. It doesn't do anything.
2. It is causing ILLink warnings, and it is easier to delete than to try to address the warnings.

I logged https://github.com/dotnet/runtime/issues/54363 to follow up and either re-implement this feature, or obsolete the attributes that no longer have any effect on the app.
ViktorHofer referenced this issue Dec 5, 2022
With dotnet/runtime#22761 and dotnet/corefx#22833, BitmapSelector.Suffix will always be null. This means this feature is dead code, and users are unable to use it.

Removing this dead code because:

1. It doesn't do anything.
2. It is causing ILLink warnings, and it is easier to delete than to try to address the warnings.

I logged https://github.com/dotnet/runtime/issues/54363 to follow up and either re-implement this feature, or obsolete the attributes that no longer have any effect on the app.

Commit migrated from dotnet/runtime@9199eb6
@JeremyKuhne JeremyKuhne transferred this issue from dotnet/runtime Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Drawing System.Drawing issues
Projects
None yet
Development

No branches or pull requests

2 participants