Skip to content

Share the Profile information for WindowsDesktop between runtime and targeting packs#3402

Merged
ericstj merged 1 commit intodotnet:mainfrom
ericstj:fixRuntimePackClassifications
Nov 18, 2025
Merged

Share the Profile information for WindowsDesktop between runtime and targeting packs#3402
ericstj merged 1 commit intodotnet:mainfrom
ericstj:fixRuntimePackClassifications

Conversation

@ericstj
Copy link
Member

@ericstj ericstj commented Nov 18, 2025

Fixes dotnet/windowsdesktop#5405

Did this in a way that should make sure it won't happen again. Moved all the classifications in the same place, had to do it in targets so that the import could use the property defined by nuget (not available in props).

Fixed the broken conditions in the WinForms targets.

@ericstj
Copy link
Member Author

ericstj commented Nov 18, 2025

/backport to release/10.0.1xx

@github-actions
Copy link
Contributor

Started backporting to release/10.0.1xx (link to workflow run)

@github-actions
Copy link
Contributor

@ericstj backporting to release/10.0.1xx failed, the patch most likely resulted in conflicts. Please backport manually!

git am output
$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch

Applying: Share the Profile information for WindowsDesktop between runtime and targeting packs
.git/rebase-apply/patch:79: trailing whitespace.
  
warning: 1 line adds whitespace errors.
Using index info to reconstruct a base tree...
M	src/windowsdesktop/src/windowsdesktop/src/sfx/Directory.Build.targets
M	src/windowsdesktop/src/windowsdesktop/src/sfx/Microsoft.WindowsDesktop.App.Runtime.sfxproj
Falling back to patching base and 3-way merge...
Auto-merging src/windowsdesktop/src/windowsdesktop/src/sfx/Directory.Build.targets
CONFLICT (content): Merge conflict in src/windowsdesktop/src/windowsdesktop/src/sfx/Directory.Build.targets
Auto-merging src/windowsdesktop/src/windowsdesktop/src/sfx/Microsoft.WindowsDesktop.App.Runtime.sfxproj
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Share the Profile information for WindowsDesktop between runtime and targeting packs
Error: The process '/usr/bin/git' failed with exit code 128

Link to workflow output

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR consolidates Windows Desktop profile information to be shared between runtime and targeting packs by moving common file classifications from .props files to a shared .targets file. This ensures consistency and prevents the issue where profile information was not being shared properly between the runtime and targeting packs.

  • Moved all package references and framework file classifications from Directory.Build.props to Directory.Build.targets to enable use of NuGet-generated properties
  • Fixed WinForms targeting pack conditions to use PlatformPackageType instead of PackageTargetRuntime
  • Removed duplicate Windows Forms classifications from runtime-specific project files

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
System.Windows.Forms.FileClassification.props Updated conditions to use PlatformPackageType property instead of PackageTargetRuntime for determining ref vs runtime pack
Microsoft.WindowsDesktop.App.Runtime.sfxproj Removed Windows Forms specific file classifications that are now defined in shared location
Microsoft.WindowsDesktop.App.Ref.sfxproj Removed import of WinForms classifications (now imported from shared Directory.Build.targets)
Directory.Build.targets Added all shared package references and framework file classifications, including WinForms import
Directory.Build.props Removed all package references and file classifications (moved to Directory.Build.targets)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ericstj ericstj merged commit a6515a0 into dotnet:main Nov 18, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

System.Drawing.Common is manifested differently in SDK and Runtime NuGet

3 participants