✅ Could not load file or assembly 'StackExchange.Redis
What causes these errors? How do I fix it? The project builds find on my windows machine. But running it on my ubuntu server causes this error to occur. The server is running dotnet 7.0
28 Replies
doublecheck your package references
does it build fine on your windows machine if you do
dotnet clean dotnet build
Yes that builds fine
These are my package references
@Pobiega any ideas?
Curious. You have 2.6.9 in your csproj, but its trying to resolve 2.0.0?
But other than that, no direct ideas.
Yeah I can't work out for the life of me where it's getting 2.0.0 from
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Ah okay, any ideas how I can resolve the issue?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
No errors. Also, I'm using rider.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
no not easily unfortunately
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Yeah, it's meant to be a library
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I just don't understand why it can't load this
ould not load file or assembly 'StackExchange.Redis, Version=2.0.0.0, Culture=neutral, PublicKeyToken=c219ff1ca8c2ce46'. The system cannot find the file specified.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
It used to be able to
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
both
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I've never used dotnet publish for this library. Only for the console app
sorry, this library is a plugin for another console app
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Ah okay that makes sense
dotnet publish -c Release -r linux-x64 -p:PublishSingleFile=true --self-contained false
this is what I use to publish
Okay so I found out that if I add those packages to the main console project the errors go awayUnknown User•2y ago
Message Not Public
Sign In & Join Server To View
tebeco#0205
check the publish folder if there the dll there
Quoted by
<@!689473681302224947> from #Could not load file or assembly 'StackExchange.Redis (click here)
React with ❌ to remove this embed.