Burstaholic
Burstaholic

Reputation: 33

ServiceStack Redis NuGet Dependency Version Errors at Runtime

After running a package update with NuGet, I can no longer run my application. It builds just fine, but when run I receive:

Could not load file or assembly 'ServiceStack.Interfaces, Version=4.0.2.0, Culture=neutral, PublicKeyToken=e06fbc6124f57c43' or one of its dependencies. The system cannot find the file specified.

This seems to result from the version number being incorrect, but I can find no way to fix it, as that number does not appear in any user-editable file. My .csproj is looking for Version=4.0.0.0, in fact. Changing this has no useful effect.

The first time I installed ServiceStack.Redis, I had to manually fix the References in my .csproj file to use the correct versions, but this time it seems that fix will not work.

I'm not sure if I don't understand how to use NuGet, or if these packages are just broken, but how do I get a working installation?

Edit - packages.config:

<?xml version="1.0" encoding="utf-8"?>
    <packages>
      <package id="ServiceStack.Common" version="4.0.11" targetFramework="net40" />
      <package id="ServiceStack.Interfaces" version="4.0.11" targetFramework="net40" />
      <package id="ServiceStack.Redis" version="4.0.11" targetFramework="net40" />
      <package id="ServiceStack.Text" version="4.0.11" targetFramework="net40" />
    </packages>

Upvotes: 0

Views: 1901

Answers (1)

mythz
mythz

Reputation: 143284

You have dirty dlls and need to do a clean uninstall of all ServiceStack packages. i.e.

  • Remove all references of ServiceStack dlls from your projects
  • Delete the NuGet /packages folder and packages.config
  • Remove all assembly binding redirects from your App/Web.config
  • Delete your /bin and /obj folders

Then install the packages again from NuGet, starting from this clean slate.

Upvotes: 1

Related Questions