C
C#2y ago
Arkatme

✅ 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
Pobiega
Pobiega2y ago
doublecheck your package references does it build fine on your windows machine if you do
dotnet clean dotnet build
Arkatme
Arkatme2y ago
Yes that builds fine
Arkatme
Arkatme2y ago
These are my package references
Arkatme
Arkatme2y ago
@Pobiega any ideas?
Pobiega
Pobiega2y ago
Curious. You have 2.6.9 in your csproj, but its trying to resolve 2.0.0? But other than that, no direct ideas.
Arkatme
Arkatme2y ago
Yeah I can't work out for the life of me where it's getting 2.0.0 from
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Arkatme
Arkatme2y ago
Ah okay, any ideas how I can resolve the issue?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Arkatme
Arkatme2y ago
No errors. Also, I'm using rider.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Arkatme
Arkatme2y ago
no not easily unfortunately
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Arkatme
Arkatme2y ago
Yeah, it's meant to be a library
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Arkatme
Arkatme2y ago
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
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Arkatme
Arkatme2y ago
It used to be able to
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Arkatme
Arkatme2y ago
both
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Arkatme
Arkatme2y ago
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
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Arkatme
Arkatme2y ago
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 away
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
MODiX
MODiX2y ago
tebeco#0205
check the publish folder if there the dll there
React with ❌ to remove this embed.
Want results from more Discord servers?
Add your server
More Posts