https://github.com/fabulous-dev/fsharp.maui.winuicompat
A dummy C# library to let MAUI F# template compile for WinUI
https://github.com/fabulous-dev/fsharp.maui.winuicompat
Last synced: about 1 year ago
JSON representation
A dummy C# library to let MAUI F# template compile for WinUI
- Host: GitHub
- URL: https://github.com/fabulous-dev/fsharp.maui.winuicompat
- Owner: fabulous-dev
- License: apache-2.0
- Created: 2022-11-15T16:49:12.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-17T08:22:40.000Z (over 3 years ago)
- Last Synced: 2025-03-22T05:06:17.232Z (over 1 year ago)
- Language: C#
- Homepage:
- Size: 194 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# 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
```xml
(...)
```
2. In the file `Platforms\Windows\App.fs`, change the inherited class to `FSharp.Maui.WinUICompat.App`
```diff
type App() =
- inherit MauiWinUIApplication()
+ inherit FSharp.Maui.WinUICompat.App()
```
3. Create the file `Platforms\Windows\Main.fs`, add the following code
```fs
module Program =
[]
[]
let main args =
do FSharp.Maui.WinUICompat.Program.Main(args, typeof)
0
```
Where `YourApp.WinUI.App` is the `App` class defined in step 2