Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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
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.
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.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
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:
I keep getting this error:
The project has no reference to Newtonsoft.Json so I am confused. I have also tried to run this command first:
but then I get this error:
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
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.
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.
is working on a reply...