Skip to content

Add a profile attribute to files in windows desktop runtime pack - #4227

Merged
LakshanF merged 3 commits into
dotnet:mainfrom
LakshanF:AddProfileToRuntimeList
Mar 14, 2024
Merged

LakshanF merged 3 commits into
dotnet:mainfrom
LakshanF:AddProfileToRuntimeList

Conversation

@LakshanF

@LakshanF LakshanF commented Mar 11, 2024 •

Copy link
Copy Markdown
Contributor

Adds a profile attribute to the RuntimeList.xml in windows desktop runtime pack, similar to the corresponding target pack. This is needed to fix issue 37088 and PR 39402 has the corresponding SDK fix.

The target pack uses System.Windows.Forms.FileClassification.props but the analyzer assemblies (System.Windows.Forms.Analyzers.CSharp.dll, System.Windows.Forms.Analyzers.dll) causes problems and hence the runtime pack uses the assembly names explicitly. Also, the runtime pack has extra assemblies than the target pack. The assembly, System.Private.Windows.Core.dll, isn't tagged with a profile.

@ViktorHofer

Copy link
Copy Markdown
Member

Isn't this possible without hardcoding all the assemblies?

@LakshanF

Copy link
Copy Markdown
Contributor Author

Isn't this possible without hardcoding all the assemblies?

This is mostly following the way target pack does this, and the runtime seems to have more files than the target pack. CreateFrameworkListFile that gets invoked via FrameworkListFileClass have validation mechanism to ensure that the content in RuntimeList.xml have the right profile tag.

@sbomer sbomer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have an understanding of the framework generation logic, but since it sounds like the tooling will validate the list this LGTM. Thanks!

Comment on lines +50 to +68
<!-- Windows Forms specific references -->
<ItemGroup>
<FrameworkListFileClass Include="Microsoft.VisualBasic.Forms.dll" Profile="WindowsForms" />
<FrameworkListFileClass Include="Microsoft.VisualBasic.dll" Profile="WindowsForms" />
<FrameworkListFileClass Include="System.Design.dll" Profile="WindowsForms" />
<FrameworkListFileClass Include="System.Drawing.Common.dll" Profile="WindowsForms" />
<FrameworkListFileClass Include="System.Drawing.Design.dll" Profile="WindowsForms" />
<FrameworkListFileClass Include="System.Drawing.dll" Profile="WindowsForms" />
<FrameworkListFileClass Include="System.Windows.Forms.Design.Editors.dll" Profile="WindowsForms" />
<FrameworkListFileClass Include="System.Windows.Forms.Design.dll" Profile="WindowsForms" />
<FrameworkListFileClass Include="System.Windows.Forms.Primitives.dll" Profile="WindowsForms" />
<FrameworkListFileClass Include="System.Windows.Forms.dll" Profile="WindowsForms" />
<FrameworkListFileClass Include="Microsoft.VisualBasic.Forms.resources.dll" Profile="WindowsForms" />
<FrameworkListFileClass Include="System.Windows.Forms.Design.resources.dll" Profile="WindowsForms" />
<FrameworkListFileClass Include="System.Windows.Forms.Primitives.resources.dll" Profile="WindowsForms" />
<FrameworkListFileClass Include="System.Windows.Forms.resources.dll" Profile="WindowsForms" />
<FrameworkListFileClass Include="System.Windows.Input.Manipulations.resources.dll" Profile="WindowsForms" />
<FrameworkListFileClass Include="System.Private.Windows.Core.dll"/>
</ItemGroup>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an incorrect way of doing this. The Windows Forms items must be imported from System.Windows.Forms.FileClassification.props. If the content of the props file is incorrect then it must be updated: https://github.com/dotnet/winforms/tree/main/pkg/Microsoft.Private.Winforms#sdkdotnet-windowsdesktop-folder

/cc: @lonitra

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants