You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.Runtime.InteropServices.COMException (0x80004005): Unspecified error
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)
at WinRT.BaseActivationFactory._ActivateInstance[I]()
at WinRT.ActivationFactory`1.ActivateInstance[I]()
at Microsoft.UI.Xaml.Controls.XamlControlsResources..ctor()
at System.RuntimeType.CreateInstanceOfT()
--- End of inner exception stack trace ---
at System.RuntimeType.CreateInstanceOfT()
at System.Activator.CreateInstance[T]()
at Microsoft.Maui.Platform.ResourceDictionaryExtensions.AddLibraryResources[T](ResourceDictionary resources)
at Microsoft.Maui.Hosting.MauiAppBuilder.MauiCoreInitializer.<Initialize>g__SetupResources|0_1()
at Microsoft.Maui.Hosting.MauiAppBuilder.MauiCoreInitializer.Initialize(IServiceProvider services)
at Microsoft.Maui.Hosting.MauiAppBuilder.Build()
at MauiExample.App.MauiProgram.CreateMauiApp()
at MauiExample.App.WinUI.App.CreateMauiApp()
at Microsoft.Maui.MauiWinUIApplication.OnLaunched(LaunchActivatedEventArgs args)
at Microsoft.UI.Xaml.Application.Microsoft.UI.Xaml.IApplicationOverrides.OnLaunched(LaunchActivatedEventArgs args)
at ABI.Microsoft.UI.Xaml.IApplicationOverrides.Do_Abi_OnLaunched_0(IntPtr thisPtr, IntPtr args)
OS: Windows 10
The text was updated successfully, but these errors were encountered:
@0x0309 Thanks for the report.
Unfortunately the FSharp.Maui.WinUICompat package is in itself more of a workaround than a proper library.
Its goal is to allow basic F# WinUI apps to run, and does not cover all cases.
Also, I don't have much knowledge of WinUI. The workaround logic was mostly done by @PureWeen. I only packaged it for simpler use with Fabulous. And F# WinUI is not really a priority given Microsoft itself doesn't plan any F# support.
If you or someone else are motivated to investigate the issue, I'll be happy to review the PR and release a new package for it.
Steps to reproduce
dotnet new fabulous-mauicontrols -n MauiExample.App
dotnet build
succeeds and the app can be run<WindowsPackageType Condition="$(TargetPlatformIdentifier) == 'windows'">None</WindowsPackageType>
<WindowsAppSdkUndockedRegFreeWinRTInitialize Condition="$(TargetPlatformIdentifier) == 'windows'">false</WindowsAppSdkUndockedRegFreeWinRTInitialize>
Main.fs
(manually initialize becauseWindowsAppSdkUndockedRegFreeWinRTInitialize
doesn't yet work out-of-the-box for F#, Can't build fsproj with WindowsPackageType=None microsoft/WindowsAppSDK#3663)Expected
The app launches as it did in step 2
Actual
An exception is thrown
OS: Windows 10
The text was updated successfully, but these errors were encountered: