U4-3396 - PowerShell script error when installing Umbraco 7RC via NuGet

Created by Ryan Lewis 05 Nov 2013, 15:56:55 Updated by Sebastiaan Janssen 05 Jun 2015, 16:28:23

  1. Create empty ASP.NET web application
  2. In Package Manager Console: install-package umbracocms -pre
  3. Prompted to overwrite my web.config file. Press A (Yes To All)
  4. "Successfully add 'UmbracoCms 7.0.0.-RC' to MyProject.Web"

At that point, I get the following error:

Remove-Item : Cannot find path 'C:\dev\MyProject\MyProject.Web\bin\Newtonsoft.Json.dll' because it does not exist. At C:\dev\MyProject\packages\UmbracoCms.7.0.0-RC\tools\install.ps1:29 char:13

  • Remove-Item <<<<  $jsonDllFile -Confirm:$false
    
    • CategoryInfo : ObjectNotFound: (C:\dev\MyProject...onsoft.Json.dll:String) [Remove-Item], ItemNotFoundException
    • FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand

First attempt to run the solution results in an error (related?). Second attempt starts the app and the Umbraco installation process. Everything works fine after that. NewtonSoft.Json.dll exists in ~\bin when running

Comments

Sebastiaan Janssen 05 Nov 2013, 19:08:27

Thanks Ryan, I'll have to review that, need to check if the file actually exists first.


James Green 09 Nov 2013, 00:46:06

I have experienced this also using the same 4 steps above and got a YSOD upon viewing the new project in a browser.

It seems the UmbracoCms.Core.7.0.0-RC.nuspec file declares a dependency on Newtonsoft.Json [5.0.0, 6.0.0) but the YSOD message is: "Could not load file or assembly 'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified."

I ran update-package -reinstall Newtonsoft.Json which seemed to resolve it, but perhaps a clean & build would have also. Let me know if I can provide repro files.

JG


Sebastiaan Janssen 18 Nov 2013, 14:01:46

Fixed in rev 17db60c34a55ba4df4e879481b1cd77e25f48e3c


Priority: Normal

Type: Bug

State: Fixed

Assignee:

Difficulty: Normal

Category: Installation

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.0.0

Due in version: 7.0.0

Sprint:

Story Points:

Cycle: