C#C
C#3y ago
E.AZER

Exception Unhandled : Could not load file or assembly 'Serilog.Extensions.Hosting

When I run my application, this exception is thrown even before the start of debugging.
System.IO.FileNotFoundException: 'Could not load file or assembly 'Serilog.Extensions.Hosting, Version=7.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10'. Le fichier spécifié est introuvable.'

This is my .csproj references :
<PackageReference Include="Serilog" Version="3.0.1" />
<PackageReference Include="Serilog.AspNetCore" Version="7.0.0.0" />
<PackageReference Include="StackExchange.Redis" Version="2.6.122" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />

I tried to clean and build the entire solution and projects so many times also "dotnet restore",
*Closing visual studio
*Deleting all bin and obj folders
*Reopen VS, restore nugets
*Clean and rebuild
Capture_decran_2023-11-17_111105.png
Capture_decran_2023-11-18_104944.png
Was this page helpful?