Closed azchohfi closed 11 months ago
This bug will have been fixed in the broker interop https://github.com/AzureAD/microsoft-authentication-library-for-cpp/pull/3807/files (private repo) but not yet released.
@ashok672, @iulico-1 - regular release goes out every Thu of every month, so next one is scheduled on Dec 7. Happy to help with an out of band release if needed by partners.
Released in 4.58.0.
I'm still having issues even with 4.58.0:
Unhandled exception: System.IO.FileNotFoundException: Could not find file 'System.Windows.Forms'.
File name: 'System.Windows.Forms'
at Internal.Runtime.TypeLoaderExceptionHelper.CreateFileNotFoundException(ExceptionStringID, String) + 0x43
at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowFileNotFoundException(ExceptionStringID, String) + 0x9
Maybe it is related to this? https://github.com/dotnet/winforms/issues/4649
I did have an ILC warning during my compilation, mentioning exactly that method:
2>ILC: Method '[msstore]MSStore.CLI.Services.TokenManager.MSALTokenManager+<InitAppAsync>d__16.MoveNext()' will always throw because: Failed to load assembly 'System.Windows.Forms'
Oh, actually that was a misconfiguration in my compilation. I had SelfContained=false. It had to be true.
Library version used
4.57.0
.NET version
8.0
Scenario
PublicClient - desktop app
Is this a new or an existing app?
None
Issue description and reproduction steps
Calling await _app.GetAccountsAsync() with nativeaot turned on throws an exception.
Relevant code snippets
Expected behavior
Works with NativeAOT.
Identity provider
Microsoft Entra ID (Work and School accounts and Personal Microsoft accounts)
Regression
No response
Solution and workarounds
No response