Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ayo Adesina 430 posts 1023 karma points
    Nov 13, 2014 @ 13:51
    Ayo Adesina
    0

    Installing Specfic Package Version (Umbraco) via Nuget

    I'm trying to install a specific version of a nuget package in to particular project in my soulution using this command:

    install-package UmbracoCms -version 6.2.4 -project Pws.Site.Web
    

    I keep getting this error:

    Install-Package : Already referencing a newer version of 'Newtonsoft.Json'.
    At line:1 char:16
    + install-package <<<<  UmbracoCms -version 6.2.4 -project Pws.Site.Web
    + CategoryInfo          : NotSpecified: (:) [Install-Package], InvalidOperationException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
    

    The project has no reference to Newtonsoft.Json so I am confused. I have also tried to run this command first:

    Uninstall-Package Newtonsoft.Json -Force -project Pws.Site.Web
    

    but then I get this error:

    Uninstall-Package : Unable to find package 'Newtonsoft.Json' in 'PWS.Site.Web'.
    At line:1 char:18
    + Uninstall-Package <<<<  Newtonsoft.Json -Force -project Pws.Site.Web
    + CategoryInfo          : NotSpecified: (:) [Uninstall-Package], InvalidOperationException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.UninstallPackageCommand
    

    Any ideas on this? - Why can't we select what version of a package we want via the Nuget Dialog window! (If you can do that please let me know how)

    Thanks in Advance! Ayo

  • Dan Lister 416 posts 1974 karma points c-trib
    Nov 14, 2014 @ 13:17
    Dan Lister
    0

    Hi Ayo,

    Do you have the Newtonsoft.Json package installed in any other project? Also, I think the project name is case sensitive when using via the command line tool. Do your project names match?

    Thanks, Dan.

  • Ayo Adesina 430 posts 1023 karma points
    Nov 14, 2014 @ 14:26
    Ayo Adesina
    0

    It turns out that the project type I was trying to install umbraco in to was the wrong one.

    I had a blank ASP.net Web Application.

    I deleted the project then created a blank MVC project.... and hey presto it works.

    Thanks Dan.

    Hope this helps someone else one day.

Please Sign in or register to post replies

Write your reply to:

Draft