Skip to content

Commit

Permalink
Fix tests on .NET Framework 4.8
Browse files Browse the repository at this point in the history
Was getting this exception because of assembly version mismatch:
> System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Extensions.Configuration.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
  • Loading branch information
0xced committed May 8, 2023
1 parent 321156e commit 4ec3365
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/TestApp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

Thread.CurrentThread.Name = "Main thread";

var configurationValues = new Dictionary<string, string>
var configurationValues = new Dictionary<string, string?>
{
["Serilog:Enrich:0"] = "WithThreadName",
["Serilog:WriteTo:0:Name"] = "Console",
Expand Down
4 changes: 2 additions & 2 deletions test/TestApp/TestApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
<ItemGroup Condition="$(Configuration) == 'Debug'">
<ProjectReference Include="..\..\src\Serilog.Settings.Configuration\Serilog.Settings.Configuration.csproj" />
</ItemGroup>

<ItemGroup Condition="$(Configuration) == 'Release'">
<PackageReference Include="Serilog.Settings.Configuration" Version="[0.0.0-IntegrationTest.0]" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Costura.Fody" Version="5.7.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
<PackageReference Include="Serilog.Enrichers.Thread" Version="3.1.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
</ItemGroup>
Expand Down

0 comments on commit 4ec3365

Please sign in to comment.