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
13 Replies
what hapepns if you add
<PackageReference Include="Serilog.Extensions.Hosting" Version="7.0.0.0" />
?
(recognizing that it seems that Serilog.AspNetCore is supposed to pull this in already)
If that doesn't work:
What dotnet version is this project targeting? (TargetFramework(s) in csproj)
and can you post the output of dotnet --list-sdks
, dotnet --list-runtimes
hing happens, I did it before 🫣 even I'm not sure if there is a difference between 7.0.0 & 7.0.0.0
those should be the same afaik, yeah
just a moment pls , I'm updating the vs now , still waiting ...
I tryed to delete bin and obj too
That's a weird problem , two days searching for a solution ;/
debugging the code the builds your code is always the most annoying thing
Unknown User•12mo ago
Message Not Public
Sign In & Join Server To View
TeBeCo
can you share your full csproj
Quoted by
<@689473681302224947> from #Exception Unhandled : Could not load file or assembly 'Serilog.Extensions.Hosting (click here)
React with ❌ to remove this embed.
I'm already using 7.0.0
you can see the attached images
TeBeCo
can you share your full csproj
Quoted by
<@689473681302224947> from #Exception Unhandled : Could not load file or assembly 'Serilog.Extensions.Hosting (click here)
React with ❌ to remove this embed.
Unknown User•12mo ago
Message Not Public
Sign In & Join Server To View
I can't send all of it, there is some confidential things related to my job , sorry for that
Unknown User•12mo ago
Message Not Public
Sign In & Join Server To View
any suggestions how can I find the version confusion ? between version 7.0.0 and the detectable one 7.0.0.0