未能通过Visual Studio 2010中的Nuget/Package Manager安装umbraco 7.5.4

问题描述:

打开VS 2010后,我创建了一个空的MVC 4 Web应用程序'UmbracoTest'以及一个新的解决方案。视图引擎剃刀和.Net 4.在包管理器控制台,我输入PM>安装包umbracocms和提示此:未能通过Visual Studio 2010中的Nuget/Package Manager安装umbraco 7.5.4

PM> install-package umbracocms 
Attempting to resolve dependency 'UmbracoCms.Core (= 7.5.4)'. 
Attempting to resolve dependency 'Microsoft.AspNet.Mvc (≥ 5.2.3 && < 6.0.0)'. 
Attempting to resolve dependency 'Microsoft.AspNet.Razor (≥ 3.2.3 && < 3.3.0)'. 
... 
... 
Installing 'Microsoft.AspNet.Razor 3.2.3'. 
Successfully installed 'Microsoft.AspNet.Razor 3.2.3'. 
... 
... 
Removing 'Microsoft.AspNet.Razor 2.0.20710.0' from UmbracoTest. 
Successfully removed 'Microsoft.AspNet.Razor 2.0.20710.0' from UmbracoTest. 
Adding 'Microsoft.AspNet.Razor 3.2.3' to UmbracoTest. 
Uninstalling 'Microsoft.AspNet.Razor 3.2.3'. 
Successfully uninstalled 'Microsoft.AspNet.Razor 3.2.3'. 
Install failed. Rolling back... 
Install-Package : Could not install package 'Microsoft.AspNet.Razor 3.2.3'.  You are trying to install this package into a project that targets '.NETFramewo 
rk,Version=v4.0', but the package does not contain any assembly references  or content files that are compatible with that framework. 
For more information, 
contact the package author. 
At line:1 char:16 
+ install-package <<<< umbracocms 
+ CategoryInfo   : NotSpecified: (:) [Install-Package], InvalidOperationException 
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand 

PM> 

由于错误说:You are trying to install this package into a project that targets '.NETFramework,Version=v4.0'。 Umbraco依赖于不支持.NET 4.0的ASP.NET MVC 5。事实上,VS2010不支持.NET 4.5。相反,您需要Visual Studio 2012或更高版本。

如果您是学生,开源开发人员或个人开发人员,可免费提供社区版download of Visual Studio