Umbraco 7.2 cannot add a controller

I am trying to add a controller to the Controllers folder in my Umbraco 7.2 project (I created a new empty ASP.NET MVC 4 in VS2013), but I get an error

Failed to load the file or assembly ClientDependency.Core, Version = 1.7.1.2, Culture = neutral, PublicKeyToken = null or one of its dependencies. The system cannot find the specified file.

Why is this?

+4
source share
4 answers

Usually, if you add umbraco to your project, it will also add ClientDependency as a reference to the DLL. You should check if you have this dll in the bin folder.
I am sure you do not have them.

dll BIN, . , indepth.

+1

Umbraco 7.2.0 7.2.1 (, , ). 7.2.2, / , .

, . : http://umbraco.com/follow-us/blog-archive/2015/2/5/security-alert-update-clientdependency-immediately

- :

Uninstall-Package ClientDependency -Force

:

Install-Package ClientDependency -Version 1.7.1.2

: http://issues.umbraco.org/issue/U4-5996 https://our.umbraco.org/forum/getting-started/installing-umbraco/38333-Error-creating-Controller-in-Umbraco-v6?p=2#comment169649

2 :

  • Umbraco >= 7.2.2: Update-package UmbracoCms

  • Controller UmbracoController ( , )

+1

. packages.config :

<package id="ClientDependency" version="1.7.1.2" targetFramework="net45" />
<package id="ClientDependency-Mvc" version="1.7.0.4" targetFramework="net45" />

Make sure the basket dealer matches and you should be good to go. You may need to close the project in VS and reopen it. If you run into the same issue with EntityFramework, change it to 5.0.0 and make sure the correct version is in the bin directory.

0
source

Upgrading umbraco mvc to the latest version (v7.2.2) solves the problem.

I am using Nuget Package Manager v2.8.50926.663 and Visual Studio 2013.

Hope this helps you too.

0
source

All Articles