I am working on a WPF .NET Core application. I want to publish it as a self-contained .exe. To do this, a few fields are required:
If I _just_ add a RuntimeIdentifier property, App Center no longer collects analytics or crash data. If I remove the RuntimeIdentifer property, App Center behaves as expected.
Please list the steps used to reproduce your issue.
AppCenter.LogLevel = LogLevel.Verbose before your call to AppCenter.Start(...) and include the logs here:The program '[13460] DotNetConf.exe: Program Trace' has exited with code 0 (0x0).
The program '[13460] DotNetConf.exe' has exited with code 0 (0x0).
As an update - this seems to be the interesting bit as it pertains to this bug:
2019-09-19 08:13:55.249 [AppCenter] ERROR: An error occurred while initializing storage
System.TypeInitializationException: The type initializer for 'SQLite.SQLiteConnection' threw an exception.
---> System.DllNotFoundException: Unable to load DLL 'e_sqlite3' or one of its dependencies: The specified module could not be found. (0x8007007E)
at SQLitePCL.SQLite3Provider_e_sqlite3.NativeMethods.sqlite3_libversion_number()
at SQLitePCL.SQLite3Provider_e_sqlite3.SQLitePCL.ISQLite3Provider.sqlite3_libversion_number()
at SQLitePCL.raw.SetProvider(ISQLite3Provider imp)
at SQLitePCL.Batteries_V2.Init()
Some other notes:
@diverdan92 can you try this other workaround to avoid committing a dll to git?
<PackageReference Include="SQLitePCLRaw.lib.e_sqlite3.v110_xp" Version="1.1.14" />
I could repro the issue and after updating this nuget it worked. The dll used to be copied into the wrong location for .net core.
That workaround also appears to work. Thanks!
We will document it until our SDK includes that updated dependency.
We added a note in https://docs.microsoft.com/en-us/appcenter/sdk/getting-started/wpf-winforms for the dependency to update.
We still need to do more testing on other platforms with this update before we bump in the SDK.
@guperrot Do you know if this will also be resolved when you address the problem on https://github.com/microsoft/appcenter-sdk-dotnet/issues/1264? The work around seems fine so far, but I'm nervous about it still since until I discovered it, we were having problems with crash/error messages not getting sent back to app center and/or intermittent errors bubbling up saying the SQL Raw dependency was missing. :(
Yes, this should be resolved @dragnilar .
The SDK has been released in version 3.0.0 and should fix this issue.