serilog / serilog-aspnetcore

Serilog integration for ASP.NET Core
Apache License 2.0
1.29k stars 203 forks source link

Serilog.AspNetCore v8.0.0 but assembly version 0.0.0.0 #356

Closed thohng closed 6 months ago

thohng commented 6 months ago

Serilog.AspNetCore v8.0.0 but assembly version 0.0.0.0

Description Got warning during build:

C:\Program Files\dotnet\sdk\8.0.101\Microsoft.Common.CurrentVersion.targets(2382,5): warning MSB3277: Found conflicts between different versions of "Serilog.AspNetCore" that could not be resolved. [C:\....\samples\SampleWorkerService\SampleWorkerService.csproj::TargetFramework=net6.0]
C:\Program Files\dotnet\sdk\8.0.101\Microsoft.Common.CurrentVersion.targets(2382,5): warning MSB3277: There was a conflict between "Serilog.AspNetCore, Version=0.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10" and "Serilog.AspNetCore, Version=2.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10". [C:\W

Reproduction dotnet build

Expected behavior Assembly version should corresponding to package version

Relevant package, tooling and runtime versions dotnet SDK 8.0.101

Additional context Inspecting the assembly version

image

bartelink commented 6 months ago

Triaging:

Ultimately the AssemblyVersion is pretty academic for .NET Core - is this causing a specific issue?

nblumhardt commented 6 months ago

Life still gets confusing when assembly versions are off; I'll have a dig and see what I can figure out 🧐

thohng commented 6 months ago

Confirm version Serilog.AspNetCore@v8.0.1 fixes the issue

Previously, .NET 6.0 or .NET 7.0 may got issue with Serilog.AspNetCore@v8.0.0 on runtime .NET 6.0 and Serilog.AspNetCore@v8.0.0 image

.NET 7.0 and Serilog.AspNetCore@v8.0.0 image