© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
24 replies
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
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly
C#CC# / help
3y ago
Could not load file or assembly…
C#CC# / help
2y ago
❔ could not load file or assembly
C#CC# / help
3y ago
✅ Could not load file or assembly 'StackExchange.Redis
C#CC# / help
4y ago