When trying to use the MySQL error store on a dotnet core 2.2 application I get the following error:
Exception: Could not find error store type: MySQL
StackExchange.Exceptional.ErrorStore.Get(ErrorStoreSettings settings)
StackExchange.Exceptional.Internal.ExceptionalSettingsBase.get_DefaultStore()
StackExchange.Exceptional.ExceptionalMiddleware.HandleRequestAsync(HttpContext context)
ProjectName.AdminController.Exceptions() in AdminController.cs
+
public async Task Exceptions() => await ExceptionalMiddleware.HandleRequestAsync(HttpContext);
After a bit of investigation it looks like it might be having trouble finding the StackExchange.Exceptional.MySQL.dll
|
var path = Path.GetDirectoryName(assemblyUri.LocalPath); |
On my machine the dll is in the .nuget folder /Users/johnboker/.nuget/packages/stackexchange.exceptional.mysql/2.0.0/lib/netstandard2.0
The bin folder in the project only contains my dlls and a ProjectName.deps.json that references dependencies. I'm guessing since it's not in the same folder as the loading assembly it wont find it correctly.
A bit below the above referenced line there is a call to AppDomain.CurrentDomain.GetAssemblies()
I thought that might get what was needed but when I put that in Main the following is output:
List of assemblies loaded in current AppDomain:
System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
ProjectName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
System.Runtime.Extensions, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
System.Console, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Microsoft.AspNetCore.Hosting.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
Microsoft.AspNetCore.Hosting, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
Here's my config:
"Exceptional": {
"Store": {
"ApplicationName": "ProjectName",
"Type": "MySQL",
"ConnectionString": "server=myserver;port=3306;database=exceptional;uid=xxxx;password=xxxx;"
}
In the csproj I have:
<ItemGroup>
...
<PackageReference Include="MySql.Data" Version="8.0.13" />
<PackageReference Include="StackExchange.Exceptional.MySQL" Version="2.0.0" />
<PackageReference Include="StackExchange.Exceptional.AspNetCore" Version="2.0.0" />
</ItemGroup>
So, what am I doing wrong?
When trying to use the MySQL error store on a dotnet core 2.2 application I get the following error:
After a bit of investigation it looks like it might be having trouble finding the StackExchange.Exceptional.MySQL.dll
StackExchange.Exceptional/src/StackExchange.Exceptional.Shared/ErrorStore.cs
Line 571 in 107b864
On my machine the dll is in the .nuget folder
/Users/johnboker/.nuget/packages/stackexchange.exceptional.mysql/2.0.0/lib/netstandard2.0The bin folder in the project only contains my dlls and a
ProjectName.deps.jsonthat references dependencies. I'm guessing since it's not in the same folder as the loading assembly it wont find it correctly.A bit below the above referenced line there is a call to
AppDomain.CurrentDomain.GetAssemblies()I thought that might get what was needed but when I put that in Main the following is output:
Here's my config:
In the csproj I have:
So, what am I doing wrong?