Open superwilly1 opened 6 days ago
We're encountering the same issue that's hindering our .NET 9 migration
2>C:\repos\MauiApp1\MauiApp1\MauiApp1.csproj : XamlCompiler error WMC1006: Cannot resolve Assembly or Windows Metadata file 'Type universe cannot resolve assembly: System.Xaml, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.' 2>CSC : error CS5001: Program does not contain a static 'Main' method suitable for an entry point 2>C:\repos\MauiApp1\MauiApp1\Platforms\Windows\App.xaml.cs(19,18,19,37): error CS1061: 'App' does not contain a definition for 'InitializeComponent' and no accessible extension method 'InitializeComponent' accepting a first argument of type 'App' could be found (are you missing a using directive or an assembly reference?)
This issue has been verified using Visual Studio 17.13 Preview 1( 9.0.10 & 8.0.93 & 8.0.100). Can repro this issue on Windows platform. And 8.0.100 & 8.0.93 work fine.
I'm able to reproduce this issue on a blank WinUI app (without MAUI)
So, pretty sure this issue has nothing to do with MAUI directly.
I'm leaving this open and assigned it to SR2 for now so that we maintain visibility on this one.
Description
https://github.com/dotnet/windowsdesktop/issues/4789
Our app uses MSAL to login, using the Microsoft.Identity.Client packages. This used to work in .NET8, but we updated our app to .NET9 now, and on Windows we get compile errors:
Steps to Reproduce
<PackageReference Include="Microsoft.Identity.Client.Desktop" Version="4.66.2" />
This zip file contains the above steps, just compile it on Windows and notice the compile errors: NET9MAUIWindowsIssue.zip
I am not sure if this is an issue with MAUI or with Microsoft.Identity.Client, but since it worked on MAUI with .NET8, I assume it is a MAUI related issue. Also created an issue for Microsoft.Identity.Client: https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/4993
Link to public reproduction project repository
No response
Version with bug
.NET 9 and WinUI I'm able to reproduce this on a blank WinUI APP
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.93 SR9.3
Affected platforms
Windows
Affected platform versions
Windows SDK 10.0.19041.0
Did you find any workaround?
No workaround found yet.
Relevant log output