Closed zakaluka closed 4 years ago
Did you create a C# WPF project and then added a Fabulous project?
The WPF project shouldn't extend the App
class declared in the Fabulous project.
In the WPF project, you only need to create an application class inheriting from System.Windows.Application
that will bootstrap Xamarin.Forms and load the App
class of the Fabulous project.
All the rest is then handled in the Fabulous project.
See this example: https://github.com/fsprojects/Fabulous/blob/master/Fabulous.XamarinForms/samples/CounterApp/WPF/App.fs
(Note: You can have an F# project for WPF too through the templates: https://fsprojects.github.io/Fabulous/Fabulous.XamarinForms/index.html#getting-started)
@TimLariviere thank you for responding. Sorry for all the confusion (which I will elaborate below):
So... i apparently really messed up this bug report. Everywhere I said WPF, I really meant UWP.
As for re-creating the bug, I created a fresh project to check for the internal
modifier. However, the fresh project ran without issue.
In short - I can't re-create it. As such, I'm closing this bug report.
The default WPF project does not build because, in
App.xaml.cs
, the class is declared as follows:This doesn't match the App declaration in the 'shared' project:
Adding 'internal' to the F# type didn't work as it is being accessed from elsewhere and needs to be public. I was able to work around this by removing the
internal
modifier from the C# class. However, I'm not sure if that was the right thing to do.