Skip to content

Latest commit

 

History

History
35 lines (26 loc) · 922 Bytes

README.md

File metadata and controls

35 lines (26 loc) · 922 Bytes

FSharp.Maui.WinUICompat

Precompiled Microsoft.UI.Xaml.Application compatible with the F# MAUI template.

How to use

  1. Add the FSharp.Maui.WinUICompat NuGet package to your F# MAUI project under the Windows ItemGroup
<ItemGroup Condition="$(TargetPlatformIdentifier) == 'windows'">
  (...)
  <PackageReference Include="FSharp.Maui.WinUICompat" Version="1.0.0" />
</ItemGroup>
  1. In the file Platforms\Windows\App.fs, change the inherited class to FSharp.Maui.WinUICompat.App
type App() =
-    inherit MauiWinUIApplication()
+    inherit FSharp.Maui.WinUICompat.App()
  1. Create the file Platforms\Windows\Main.fs, add the following code
module Program =
    [<EntryPoint>]
    [<STAThread>]
    let main args =
        do FSharp.Maui.WinUICompat.Program.Main(args, typeof<YourApp.WinUI.App>)
        0

Where YourApp.WinUI.App is the App class defined in step 2