Closed JesterX666 closed 1 year ago
UnitystationLauncher.Models.ServerManager.RefreshServerList
So, why u think its Avalonia bug?
@MonkAlex
Because the app fails to start at all randomly. Like it will work fine for a week then one day it will just refuse to launch. Happens on win and osx. Its like the bundled runtime just decides it will give up for some weird reason. This is the only log we have been able to get from the app.
@MonkAlex btw this is the problem: Exception Info: System.IO.FileNotFoundException: Could not load file or assembly 'System.Net.Ping,
this is on avalonia 0.9.2
This has nothing to do with Avalonia. This is a problem in your code.
btw here is the output on mac:
machine:~ user$ /Applications/StationHub ; exit;
Error:
An assembly specified in the application dependencies manifest (StationHub.deps.json) was not found:
package: 'Avalonia.Direct2D1', version: '0.9.2'
path: 'lib/netstandard2.0/Avalonia.Direct2D1.dll'
logout
Avalonia.Direct2D1
is Windows only. Pls show us your AppBuilder
How do you publish the app?
using dotnet publish. here is the command I use: dotnet publish /p:Configuration=ReleaseWIN64 /p:Platform="x64" -r win10-x64 /p:PublishSingleFile=true
And for Mac? This is targeting Windows.
Mac: dotnet publish /p:Configuration=ReleasePOSIX64 /p:Platform="x64" -r osx-x64 /p:PublishSingleFile=true
Might be good to know what version of the runtime is installed on the system that show this error.
PublishSingleFile
Don't use it. It's broken by design. It can and will cause issues on various machines.
@kekekeks yikes I had suspicions
@Gillibald I know it has happened on this windows machine I am on and runtime version is: 4.0.30319.42000
machine:~ user$ /Applications/StationHub ; exit;
Error:
An assembly specified in the application dependencies manifest (StationHub.deps.json) was not found:
package: 'Avalonia.Direct2D1', version: '0.9.2'
path: 'lib/netstandard2.0/Avalonia.Direct2D1.dll'
logout
This message suggests that you've tried to remove a dll referenced from your deps.json. That won't work with .NET Core.
If you want to trim the installation size, remove the reference to Avalonia.Desktop
and reference Avalonia.Skia
+ Avalonia.Win32
/Avalonia.X11
/Avalonia.Native
based on the target platform and call UseSkia
, UseWin32
/UseX11
/UseAvaloniaNative
directly.
if there was any stripping then it wasn't on purpose
I'm going to test a build with /p:PublishSingleFile=false
for a week or so. Already it has solved another mystery bug I was experiencing on win10
Our application uses Avalonia but it seems that it's missing some packages on some installations.
Most of our installations work fine but some have that exception:
Description: The process was terminated due to an unhandled exception. Exception Info: System.IO.FileNotFoundException: Could not load file or assembly 'System.Net.Ping, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. File name: 'System.Net.Ping, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at UnitystationLauncher.Models.ServerWrapper..ctor(Server server, AuthManager authManager, InstallationManager installManager) at UnitystationLauncher.Models.ServerManager.RefreshServerList() at System.Threading.Tasks.Task.<>c.b139_0(Object state)
at Avalonia.Threading.AvaloniaSynchronizationContext.<>cDisplayClass5_0.b__0()
at Avalonia.Threading.JobRunner.Job.Avalonia.Threading.JobRunner.IJob.Run()
at Avalonia.Threading.JobRunner.RunJobs(Nullable`1 priority)
at Avalonia.Win32.Win32Platform.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
at Avalonia.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg)
at Avalonia.Win32.Win32Platform.RunLoop(CancellationToken cancellationToken)
at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken)
at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args)
at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode)
at UnitystationLauncher.Program.Main(String[] args)