GithubHelp home page GithubHelp logo

Error "Already referencing a newer version of ServiceStack.Text" when installing from Nuget about harbour.redissessionstatestore HOT 30 OPEN

thecloudlesssky avatar thecloudlesssky commented on July 17, 2024
Error "Already referencing a newer version of ServiceStack.Text" when installing from Nuget

from harbour.redissessionstatestore.

Comments (30)

levmatta avatar levmatta commented on July 17, 2024 1

My Solution, install in this order:

install-package ServiceStack.Text -Version 3.9.11
install-package ServiceStack.Common -Version 3.9.11
install-package ServiceStack.Redis -Version 3.9.11
install-package Harbour.RedisSessionStateStore

I used it with -debug -verbose, and the output:

Attempting to resolve dependency 'ServiceStack.Common (≥ 3.9 && < 4.0)'.
Attempting to resolve dependency 'ServiceStack.Text'.
Attempting to resolve dependency 'ServiceStack.Redis (≥ 3.9 && < 4.0)'.
Installing 'Harbour.RedisSessionStateStore 1.3.0.0'.
Added file 'Harbour.RedisSessionStateStore.dll' to folder 'Harbour.RedisSessionStateStore.1.3.0.0\lib\net40'.
Added file 'Harbour.RedisSessionStateStore.pdb' to folder 'Harbour.RedisSessionStateStore.1.3.0.0\lib\net40'.
Added file 'Harbour.RedisSessionStateStore.xml' to folder 'Harbour.RedisSessionStateStore.1.3.0.0\lib\net40'.
Added file 'Harbour.RedisSessionStateStore.1.3.0.0.nupkg' to folder 'Harbour.RedisSessionStateStore.1.3.0.0'.
Successfully installed 'Harbour.RedisSessionStateStore 1.3.0.0'.
Adding 'Harbour.RedisSessionStateStore 1.3.0.0' to Web.
For adding package 'Harbour.RedisSessionStateStore 1.3.0.0' to project 'Web' that targets 'net45',
>> Assembly references are being added from 'lib\net40'
Added reference 'Harbour.RedisSessionStateStore' to project 'Web'
Added file 'packages.config'.
Successfully added 'Harbour.RedisSessionStateStore 1.3.0.0' to Web.

from harbour.redissessionstatestore.

TheCloudlessSky avatar TheCloudlessSky commented on July 17, 2024

What version of ServiceStack.Redis/Text are you trying to use? The reason for the version restriction is because of the licensing changes with v4 (which I disagree with). See #8 for more info.

from harbour.redissessionstatestore.

aappell avatar aappell commented on July 17, 2024

This is just a straight install of the latest RedisSessionStateStore in a new, empty VS2012 web application. It must be trying to install the latest v4 ServiceStack package. If I first run "Install-Package ServiceStack.Common -Version 3.9.71" then install RedisSessionStateStore it will work but updates to ServiceStack cannot be made due to the version restriction.

I understand your concerns about the v4 SS licensing. Maybe specify a specific SS version for your library to install or consider switching to a different Redis client.

from harbour.redissessionstatestore.

zibrohimov avatar zibrohimov commented on July 17, 2024

I've just got the same issue - Already referencing a newer version of 'ServiceStack.Text'.

from harbour.redissessionstatestore.

TheCloudlessSky avatar TheCloudlessSky commented on July 17, 2024

@aappell @zibrohimov I installed on a new WebForms application with my Nuget cache cleared without any issues.

image

PM> install-package Harbour.RedisSessionStateStore
Attempting to resolve dependency 'ServiceStack.Common (≥ 3.9 && < 4.0)'.
Attempting to resolve dependency 'ServiceStack.Text (≥ 3.0 && < 4.0)'.
Attempting to resolve dependency 'ServiceStack.Redis (≥ 3.9 && < 4.0)'.
Installing 'ServiceStack.Text 3.9.71'.
Successfully installed 'ServiceStack.Text 3.9.71'.
Installing 'ServiceStack.Common 3.9.71'.
Successfully installed 'ServiceStack.Common 3.9.71'.
Installing 'ServiceStack.Redis 3.9.71'.
Successfully installed 'ServiceStack.Redis 3.9.71'.
Installing 'Harbour.RedisSessionStateStore 1.3.0.0'.
Successfully installed 'Harbour.RedisSessionStateStore 1.3.0.0'.
Adding 'ServiceStack.Text 3.9.71' to WebApplication3.
Successfully added 'ServiceStack.Text 3.9.71' to WebApplication3.
Adding 'ServiceStack.Common 3.9.71' to WebApplication3.
Successfully added 'ServiceStack.Common 3.9.71' to WebApplication3.
Adding 'ServiceStack.Redis 3.9.71' to WebApplication3.
Successfully added 'ServiceStack.Redis 3.9.71' to WebApplication3.
Adding 'Harbour.RedisSessionStateStore 1.3.0.0' to WebApplication3.
Successfully added 'Harbour.RedisSessionStateStore 1.3.0.0' to WebApplication3.

from harbour.redissessionstatestore.

aappell avatar aappell commented on July 17, 2024

No, even after clearing the NuGet cache (which I have never had to do) the install fails with the same error. I'll just install v3 SS first as indicated in my last post.

from harbour.redissessionstatestore.

TheCloudlessSky avatar TheCloudlessSky commented on July 17, 2024

What version of Nuget are you using? Hopefully we can figure this out so that @zibrohimov and others won't have troubles too. There's a bug here somewhere...

from harbour.redissessionstatestore.

TheCloudlessSky avatar TheCloudlessSky commented on July 17, 2024

I just tried this in VS2013 on a different machine with a new Web project and it worked without any issues.

from harbour.redissessionstatestore.

aappell avatar aappell commented on July 17, 2024

NuGet 2.8.50126.400 on VS2012.

from harbour.redissessionstatestore.

TheCloudlessSky avatar TheCloudlessSky commented on July 17, 2024

Hmm, any chance you can try it on a different machine? I've tried it on two separate machines on a new projects and it works fine. One thing that was odd with your output is:

Attempting to resolve dependency 'ServiceStack.Common (= 3.9 && < 4.0)'.
Attempting to resolve dependency 'ServiceStack.Text'.
Attempting to resolve dependency 'ServiceStack.Redis (= 3.9 && < 4.0)'.
Attempting to resolve dependency 'ServiceStack.Text (= 3.9 && < 4.0)'.

For some reason it's attempting to use =3.9 and not >=3.9 like you'd see in my output.

Can you please clear your Nuget cache and File > New Project and only run install-package Harbour.RedisSessionStateStore -debug -verbose and write the output here?

from harbour.redissessionstatestore.

aappell avatar aappell commented on July 17, 2024

PM> install-package Harbour.RedisSessionStateStore -debug -verbose
Attempting to resolve dependency 'ServiceStack.Common (≥ 3.9 && < 4.0)'.
Attempting to resolve dependency 'ServiceStack.Text'.
Attempting to resolve dependency 'ServiceStack.Redis (≥ 3.9 && < 4.0)'.
Attempting to resolve dependency 'ServiceStack.Text (≥ 3.9 && < 4.0)'.
Install-Package : Already referencing a newer version of 'ServiceStack.Text'.
At line:1 char:16

  • install-package <<<< Harbour.RedisSessionStateStore -debug -verbose
    • CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
    • FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

I did try it on another machine with the same error. After the attempt to install the NuGet cache contained these files:
Harbour.RedisSessionStateStore.1.3.0.0.nupkg
ServiceStack.Common.3.9.11.nupkg
ServiceStack.Redis.3.9.11.nupkg
ServiceStack.Text.3.9.11.nupkg
ServiceStack.Text.4.0.12.nupkg

from harbour.redissessionstatestore.

TheCloudlessSky avatar TheCloudlessSky commented on July 17, 2024

Well I'm stumped on this one. I can't seem to reproduce it at all 😦. Maybe it has to do with me working from machines where I've worked on the project. But it shouldn't matter because I've cleared the Nuget cache before trying too. @zibrohimov Can you try running install-package Harbour.RedisSessionStateStore -debug -verbose after clearing your Nuget cache and see what it does?

You can see the dependencies on Nuget that I don't specify anything that could allow > v4 versions of ServiceStack to come in...

I'll see if I can do this from a different machine, too.

from harbour.redissessionstatestore.

toddca avatar toddca commented on July 17, 2024

I think I know the problem - Check in your cache (%userprofile%\AppData\Local\Nuget\Cache) for two versions of ServiceStack.Text.*.nupkg - I had both a 4.x and a 3.9 and received the same message as @aappell - after I removed the 4x package the install went just fine.

from harbour.redissessionstatestore.

TheCloudlessSky avatar TheCloudlessSky commented on July 17, 2024

@toddca Thanks for the tip! What's weird is that clearing the package cache with the instructions I gave above should have fixed that, no? It's really weird. I either think it's some sort of bug in Nuget or ServiceStack's dependencies, because the dependencies for this project seem correct, right? Thanks!

from harbour.redissessionstatestore.

toddca avatar toddca commented on July 17, 2024

I agree however I followed you steps and cleared out the cache as well. I think the issue is that the 3.9 (eg the latest supported dependent version) and the latest version of the ServiceStack.Text packages are being pulled down when you run install from the UI. That is all I did to get both packages in my cache.

from harbour.redissessionstatestore.

TheCloudlessSky avatar TheCloudlessSky commented on July 17, 2024

@toddca I just tried going through the UI with a different machine and I still wasn't able to have the v4 dependency installed. This is quite frustrating because I'd like to fix this issue! Any debugging help would be greatly appreciated.

from harbour.redissessionstatestore.

toddca avatar toddca commented on July 17, 2024

hmm, I am on Windows 7 with VS 2013 Ultimate and the latest version of Nuget. I will try to repro again on Monday - would like to hear from @aappell and see if this same issue happened with them and the workaround I provided worked.

from harbour.redissessionstatestore.

toddca avatar toddca commented on July 17, 2024

Of course there is going to be another issue here, even after you get this to work Nuget tells you there are updates to ServiceStack. I appreciate the fact you are not a fan of their new licensing and I agree with you. I don't believe the long term play here is to continue to try to use an older version of ServiceStack and would advise looking into another open source Redis client with a more favorable licensing model.

from harbour.redissessionstatestore.

TheCloudlessSky avatar TheCloudlessSky commented on July 17, 2024

@toddca Of course! I was planning to switch all of my libraries to use either sider, csredis or Booksleeve. My main contender was Booksleeve because I trusted the StackOverflow usage. However, it was as easily accessible to contributed being hosted on GoogleCode. However, Marc Gravell just announced the other day that it's now being replaced by StackExchange.Redis! This is awesome because the API is much better than Booksleeve and is hosted on GitHub!

from harbour.redissessionstatestore.

toddca avatar toddca commented on July 17, 2024

Yea I saw Marc's announcement and took a cursory look through the code. IMO I would consider StackExchange.Redis - would be great to see a perf comparison of the two libraries. Esp since the DevOpsGuys suggest Redis and this project as the session state provider with the best performance (ref: http://blog.devopsguys.com/2013/07/26/best-performing-asp-net-session-state-providers-2013/)

from harbour.redissessionstatestore.

aappell avatar aappell commented on July 17, 2024

I again tried to install in a new VS2012 Web App and even after clearing the NuGet cache I received the same "Already referencing a newer version of 'ServiceStack.Text'." warning. After the error the cache contained both 3.9.11 and 4.0.15 versions of SS Text. For my other Redis work I'm now using Booksleeve after trying a few others (ServiceStack, RedisBoost). I will probably switch to the new StackExchange.Redis client soon. Your "competitor" RedisSessionProvider uses Booksleeve. If you really want to stick with ServiceStack 3.9.x I'd suggest you use ILMerge to merge the required SS DLLs into yours to remove the NuGet dependencies - internalizing them to avoid potential conflicts if someone is using the latest SS version separately in their app.

from harbour.redissessionstatestore.

TheCloudlessSky avatar TheCloudlessSky commented on July 17, 2024

Semi-related, I've started switching some of my other Redis-based projects to StackExchange.Redis. So I'l be switching this one soon too.

from harbour.redissessionstatestore.

aappell avatar aappell commented on July 17, 2024

Good idea - looking forward to the new RedisSessionStateStore version.

from harbour.redissessionstatestore.

rstarkov avatar rstarkov commented on July 17, 2024

Getting the exact same error. Observe how everyone quotes this line: Attempting to resolve dependency 'ServiceStack.Text'. - notice there is no version range mentioned in this log message.

What seems to happen is that nuget goes to install ServiceStack.Common 3.9.71, sees that it has a dependency on ServiceStack.Text, messes up and installs the latest version of that package (4.0+), then proceeds with the rest and eventually notices that it also needs a 3.9 version of ServiceStack.Text.

Work-around:
PM> install-package ServiceStack.Common -Version 3.9.71
PM> install-package Harbour.RedisSessionStateStore

Now it works. Thanks, nuget, for getting in the way instead of helping. Looking forward to the StackExchange.Redis migration!

from harbour.redissessionstatestore.

TheCloudlessSky avatar TheCloudlessSky commented on July 17, 2024

Thanks @rstarkov! Do you know if it's a known issue in NuGet?

from harbour.redissessionstatestore.

rstarkov avatar rstarkov commented on July 17, 2024

I'm afraid I don't. A quick search didn't find anything.

from harbour.redissessionstatestore.

redwards510 avatar redwards510 commented on July 17, 2024

Just adding that I experienced this too and it makes using this library tough unless you read this page. Would re-ordering the dependencies in the nuget package fix it?

from harbour.redissessionstatestore.

TheCloudlessSky avatar TheCloudlessSky commented on July 17, 2024

Nope - I think it's a ServiceStack.Redis. I'm going to be removing the dependency on ServiceStack.Redis in favor of StackExchange.Redis.

from harbour.redissessionstatestore.

barankaynak avatar barankaynak commented on July 17, 2024

StackExchange.Redis would be great! Thanks TheCloudlessSky for this awsome library.

from harbour.redissessionstatestore.

TheCloudlessSky avatar TheCloudlessSky commented on July 17, 2024

Maybe this is relevant to how SS/Nuget dependencies play together?

from harbour.redissessionstatestore.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.