Skip to content

Update to version 3.x breaks Avalonia projects #260

@enegs

Description

@enegs

Describe the Bug

Updating from 2.x to 3.x breaks Avalonia projects.
App crashes at launch, it seems that xaml content (files?) cannot be loaded.

Steps to Reproduce

  1. Create blank Avalonia .NET Core App
  2. Add GitInfo nugget 3.x
  3. Launch app

Ready to use sample: https://github.com/enegs/GitInfo3UpdateBreaksAvaloniaApp

Expected Behavior

App should load and run.

Exception with Stack Trace

Avalonia.Markup.Xaml.XamlLoadException
HResult=0x80131500
Message=No precompiled XAML found for GitInfo3UpdateBreaksAvaloniaApp.App, make sure to specify x:Class and include your XAML file as AvaloniaResource
Source=Avalonia.Markup.Xaml
StackTrace:
at Avalonia.Markup.Xaml.AvaloniaXamlLoader.Load(Object obj) in //src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoader.cs:line 26
at GitInfo3UpdateBreaksAvaloniaApp.App.Initialize() in C:\Users\jd\source\repos\GitInfo3UpdateBreaksAvaloniaApp\App.axaml.cs:line 11
at Avalonia.Controls.AppBuilderBase`1.Setup() in /
/src/Avalonia.Controls/AppBuilderBase.cs:line 308
at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 208
at GitInfo3UpdateBreaksAvaloniaApp.Program.Main(String[] args) in C:\Users\jd\source\repos\GitInfo3UpdateBreaksAvaloniaApp\Program.cs:line 12

Version Info

GitInfo 3.0.2 or 3.0.4
Avalonia 0.10.18
.NET 6.0 or .NET 7.0

Additional Info

  • No problem with latest 2.3.0 version.
  • Adding <GitVersion>false</GitVersion> does not solve the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions