question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iOS build fails on Mac M1 with VS2022 using avalonia.xplat template

See 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. To Reproduce Steps to reproduce the behavior:

  1. Ensure dotnet core SDK 6.0.300 is installed
  2. Ensure the latest version of XCode is installed
  3. Create an empty directory
  4. Run dotnet new avalonia.xplat
  5. run dotnet workload restore
  6. run dotnet restore
  7. cd {myproject}.iOS
  8. dotnet run
  9. 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.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
maxkatz6commented, Jun 23, 2022

@NullFragment not related. Check breaking changes page https://github.com/AvaloniaUI/Avalonia/wiki/Breaking-Changes Note that 11.0 is in development and nightly builds might not be stable.

0reactions
NullFragmentcommented, Jun 23, 2022

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

I’m using Avalonia Templates @ v0.10.14 and I’ve tried all of the Avalonia NuGet packages at 0.10.999-cibuild0021189-beta and 0.10.999-cibuild0021319-beta

Read more comments on GitHub >

github_iconTop Results From Across the Web

iOS build fails on Mac M1 with VS2022 using avalonia. ...
Using a brand new project created from the Avalonia xplat template, on MacOS Monterey, it is not possible to build the iOS project....
Read more >
I cannot get AvaloniaUi (Android, IOS, Browser) to build in ...
so am trying to build Avalonia Cross Platform UI to build on Mac M1. Unfortunately, I have only been able to get the...
Read more >
macOS Distribution
macOS applications are typically distributed in a .app application bundle. ... Use Xcode to edit Info.plist , it has auto-completion for all properties....
Read more >
Install
The best place to get started with Avalonia is by creating an application using a template. To install the Avalonia templates, run the...
Read more >
Untitled
WebAvalonia (https://avaloniaui.net/) is a cross platform XAML framework for .NET. It lets you build rich application experiences using XAML markup language ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found