NetSparkleUpdater/NetSparkle

AssemblyDiagnosticsAccessor doesn't work on Linux binaries

开放

#650 创建于 2025年11月9日

 (1 条评论) (0 个反应) (0 位负责人)C# (101 个派生)auto 404
help wantedresearch

仓库指标

星标
 (822 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

When trying to use AssemblyDiagnosticsAccessor or the default SparkleUpdater.Configuration, a runtime error will be thrown giving the following stacktrace:

Unhandled exception. NetSparkleUpdater.NetSparkleException: Error: NetSparkleUpdater is missing the company or product name tag in the assembly accessor (NetSparkleUpdater.AssemblyAccessors.AssemblyDiagnosticsAccessor)
   at NetSparkleUpdater.Configurations.JSONConfiguration.GetSavePath()
   at NetSparkleUpdater.Configurations.JSONConfiguration..ctor(IAssemblyAccessor assemblyAccessor, String savePath)
   at NetSparkleUpdater.Configurations.JSONConfiguration..ctor(IAssemblyAccessor assemblyAccessor)
   at ShinRyuModManager.UserInterface.Updater.AutoUpdating.Init()
   at ShinRyuModManager.UserInterface.Views.MainWindow..ctor()
   at ShinRyuModManager.UserInterface.App.OnFrameworkInitializationCompleted()
   at Avalonia.AppBuilder.SetupUnsafe()
   at Avalonia.AppBuilder.Setup()
   at Avalonia.AppBuilder.SetupWithLifetime(IApplicationLifetime lifetime)
   at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(AppBuilder builder, String[] args, Action`1 lifetimeBuilder)
   at ShinRyuModManager.Program.Main(String[] args)

According to the error, it claims that I'm missing a <Company> or <Product> tag, but on my builds, I have both of those set. Here's a snippet of my *.csproj

<!-- Versioning -->
<AssemblyVersion>1.2.2</AssemblyVersion>
<VersionPrefix>$(AssemblyVersion)</VersionPrefix>
<AssemblyTitle>ShinRyuModManager-CE</AssemblyTitle>
<Company>SRMM Studio</Company>
<Product>ShinRyuModManager-CE</Product>
<Copyright>2025 SRMM Studio</Copyright>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>

I believe this might be a problem with using FileVersionInfo.GetVersionInfo() on a Linux binary, as referenced here. Forcing the use of reflection with Configuration = new JSONConfiguration(new AssemblyReflectionAccessor(null)) has worked just fine though.

贡献者指南