-
Notifications
You must be signed in to change notification settings - Fork 962
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
Cleanup explicit EmbeddedResource items from System.Windows.Forms.csproj #49
Comments
@dreddy-work do the unit/integration tests cover this? I started looking and its relatively simple to change to use globbing. For <!-- Embedded Resources are globbed based on their location. -->
<ItemGroup>
<EmbeddedResource Include="Resources\System\ComponentModel\Design\*.ico">
<Generator>PublicResXFileCodeGenerator</Generator>
<LogicalName>$System.ComponentModel.Design.([System.String]::Copy('%(FileName)')).ico</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="Resources\System\WinForms\Design\Behavior\*.ico">
<Generator>PublicResXFileCodeGenerator</Generator>
<LogicalName>$System.Windows.Forms.Design.Behavior([System.String]::Copy('%(FileName)')).ico</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="Resources\System\WinForms\Design\*.ico">
<Generator>PublicResXFileCodeGenerator</Generator>
<LogicalName>$System.ComponentModel.Design([System.String]::Copy('%(FileName)')).ico</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="Resources\System\WinForms\Design\MoverGlyph.bmp">
<LogicalName>System.Windows.Forms.Design.Behavior.MoverGlyph</LogicalName>
</EmbeddedResource>
</ItemGroup> |
@elachlan, i doubt we have full test coverage here. Appreciate adding some unit tests. Soem example usage are in this file : https://github.com/dotnet/winforms/blob/main/src/System.Windows.Forms/src/System/Windows/Forms/DataGridViewHeaderCell.cs |
Unfortunately the sources that access these bitmaps are behind closed source but the way they accessing these resources is similar to what i pasted above. |
…sign.csproj` (#8358) For `System.Windows.Forms.Design` this uses globbing to add the Embedded Resources instead of explicit items. If this goes okay, I will look into the rest of the projects in the solution. Related: #49 Reference: https://stackoverflow.com/questions/46584499/how-to-add-a-glob-for-resx-files-for-new-sdk-csproj-file
@Tanya-Solyanik is the team okay with renaming resource files to allow for easier globbing? Some of the So |
Feedback from EricStj:
Replace all these explicit items with a convention. Seems that you should be able to come up with a globbing convention for these and update the reading code where it doesn't align with the convention (or update items when the convention is insufficient).
The text was updated successfully, but these errors were encountered: