I wanted to add JsonConvert to the project. I'm very new to .NET development, but I thought it'd be similar to apt-get. Install package, start working.
I open Nuget, do Package-Install NewtonSoft.Json
It rapidly uninstalled a lot of packages and then reinstalled newer versions of these without prompting.
Now the project is broken. Attempting to load the dev version of the website results in.
"Could not load file or assembly 'UrlRewritingNet.UrlRewriter' or one of its dependencies. The system cannot find the file specified."
I then tried to run Update-Package -restore... hoping that somehow it would rollback things to the way they were before it started to get fancy on our installation. No luck.
Update 3:
Adding remove-dependencies and force to Uninstall-Package, finally made it possible to remove UmbracoCms.Core.7.5.2 installation that NuGet had spontaniously added. The problem is now to install UmbracoCms.Core.7.2.1 because it doesn't seem that you can do Package-Install to add it.
PM> Install-Package UmbracoCms.Core.7.2.1
Install-Package : Unable to find package 'UmbracoCms.Core.7.2.1'
At line:1 char:16
+ Install-Package <<<< UmbracoCms.Core.7.2.1
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManag
ement.PowerShellCmdlets.InstallPackageCommand
Update 4:
Found out you have to specify versions using -version. This resulted in the following.
PM> Install-Package UmbracoCms.Core -version 7.2.1
Attempting to gather dependency information for package 'UmbracoCms.Core.7.2.1' with respect to project 'Website', targeting '.NETFramework,Version=v4.5'
Attempting to resolve dependencies for package 'UmbracoCms.Core.7.2.1' with DependencyBehavior 'Lowest'
Install-Package : Unable to find a version of 'Microsoft.AspNet.Mvc' that is co
mpatible with 'ClientDependency-Mvc 1.8.0 constraint: Microsoft.AspNet.Mvc (>=
4.0.20710)', 'Microsoft.AspNet.Mvc.FixedDisplayModes 5.0.0 constraint: Microsof
t.AspNet.Mvc (>= 5.0.0)', 'UmbracoCms.Core 7.2.1 constraint: Microsoft.AspNet.M
vc (>= 4.0.30506 && < 5.0.0)'.
At line:1 char:16
+ Install-Package <<<< UmbracoCms.Core -version 7.2.1
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
Update 5:
Officially not sure what to do... I've never experienced anything like this in my entire life of programming.
I was just going to sit down, do some light changes to the frontend and had couldn't find JsonConvert... in my naivete I installed NewtonSoft.Json with Nuget, then it intalled a new version of UmbracoCms... without prompting! Then I manage to remove it... now I can't install the older version.
Update 6:
Talking around on the web has told me that this is the huge steel-trap waiting for anyone using NuGet, and the developers themselves have admitted that its broken by design. It was a mistake for me to install NewtonSoft.Json... now I'm not sure how to reinstall the right version of UmbracoCms on the one solution I deleted it from.
I'll tell my boss development time has been extended due to this.