-
Notifications
You must be signed in to change notification settings - Fork 58
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
FrameworkReference Microsoft.WindowsDesktop.App.WindowsForms Incorrectly Includes WindowsFormsIntegration.dll #4789
Comments
Reopening for pending port to 9.0 |
Fix will be available in 9.0.1 release |
This was referenced Dec 6, 2024
@lonitra do you know the estimated date for 9.0.1 release? |
9.0.1 should be available January 14 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In .NET 9 we are experiencing issues where when adding
<FrameworkReference Include="Microsoft.WindowsDesktop.App.WindowsForms" />
in a winUI project and building, it tries to resolve System.Xaml even though WinForms does not reference Xaml. This is occurring because we had changedWindowsFormsIntegration.dll
to have profile with WPF and WindowsForms causingResolveAssemblyReferences
target to include WindowsFormsIntegration.dll in references thus pulling this .dll in even though it is only intended when no profile is specified i.e.UseWindowsForms
andUseWPF
is true as indicated in https://github.com/dotnet/wpf/blob/bbfc24fd13804a191e20064acd599b0a359092df/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.props#L45-L46. In .NET 8 there was no profile attribute for this dll.We had made this update as part of #4227 to support runtime pack respecting profiles when publish self contained winforms/wpf app (dotnet/sdk#37088)
Repro project: App11.zip
Repro steps:
msbuild -p:platform=x64 -bl
MarkupCompilePass1
target, specifically inCompileXaml
task. For that task, if we look at Parameters > ReferenceAssemblies we can see WindowsFormsIntegration.dllReferencePath
(this is what the ReferenceAssemblies parameter is in the targets file), we can see WindowsFormsIntegration.dll first gets added inResolveAssemblyReferences
target, specificallyResolveAssemblyReference
taskReferencePath
More info: This was originally reported via dotnet/maui#25883 but scenario can be simplified which is what the repro project demonstrates
The text was updated successfully, but these errors were encountered: