AvaloniaUI upgrade – No precompiled XAML found and Ambiguous invocation

Veröffentlicht von

Project not building, after removing and adding a file.

In my project, I am working with the preview version of the AvaloniaUI framework. This usually means some breaking changes when updating to the newest version. The first problem was that I was getting an „Ambiguous invocaton“ for every UI element in the code behind.

In order to fix this, the „XamlNameReferenceGenerator“ must be removed from the Nuget packages.

Since I have done some tests with the Xaml files before doing this, I ended up with the following error.

No precompiled XAML found for CookieBannerGenerator.Views.MainWindow, make sure to specify x:Class and include your XAML file as AvaloniaResource

The problem was fixed by setting the build action of the Xaml files to „AvaloniaXaml“.

Kommentar hinterlassen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert