iOS build fails on Mac M1 with VS2022 using avalonia.xplat templateSee original GitHub issue
Describe the bug
Using a brand new project created from the Avalonia
xplat template, on MacOS Monterey, it is not possible to build the iOS project.
Steps to reproduce the behavior:
- Ensure dotnet core SDK 6.0.300 is installed
- Ensure the latest version of XCode is installed
- Create an empty directory
dotnet new avalonia.xplat
dotnet workload restore
- See error:
error CS0012: The type 'UIResponder' is defined in an assembly that is not referenced. You must add a reference to assembly 'Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'.
Expected behavior I should be able to build the iOS application and launch it on the Simulator like the Avalonia Wordle application.
Desktop (please complete the following information):
- OS: MacOS
- Version Monterey
Additional context Could not isolate the difference between the Wordle application and the created application from the template. The Avalonia Wordle sample application compiles and launches, but crashes on Startup. Would appreciate a workaround until the next stable version is published if this can be solved.
- Created a year ago
- Comments:8 (3 by maintainers)
Top GitHub Comments
I came across this issue while trying to look into Avalonia. Upgrading to a newer nightly build still results in build failures for me (nothing was modified in the project other than the NuGet package versions):
XamlX.XamlParseException: Unable to resolve type FluentTheme from namespace https://github.com/avaloniaui Line 10, position 10. MainWindow.axaml.cs(9, 13): [CS0103] The name 'InitializeComponent' does not exist in the current context MainView.axaml.cs(9, 13): [CS0103] The name 'InitializeComponent' does not exist in the current context
Avalonia Templates @ v0.10.14 and I’ve tried all of the Avalonia NuGet packages at