繁体   English   中英

Visual Studio 2012和Umbraco 7

[英]Visual Studio 2012 and Umbraco 7

我正在尝试从Visual Studio 2012中的NuGet安装干净的Umbraco安装,但是当我尝试运行代码时,出现此错误

你调用的对象是空的。

[NullReferenceException: Object reference not set to an instance of an object.]
   Umbraco.Web.UmbracoModule.BeginRequest(HttpContextBase httpContext) +16
   Umbraco.Web.UmbracoModule.<Init>b__8(Object sender, EventArgs e) +253
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +136
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

我的步骤

  1. 新项目
  2. ASP.NET MVC 4 Web应用程序
  3. 空[解决方案模板]
  4. 打开软件包管理器控制台
  5. 安装nuget; PM>安装包UmbracoCms
  6. 建立解决方案
  7. 得到我的错误

注意:我正在安装7.1.1版并使用Visual Studio 2012 Professional

在将Umbraco cms安装到现有VS MVC4项目之前,必须删除

  1. App_Start文件夹中的所有配置文件,
  2. “视图”文件夹中的web.config和
  3. MVC项目的global.asax文件。

有关更多详细信息,请参阅链接http://umbraco.tv/videos/developer/fundamentals/surface-controllers/setting-up-the-vs-solution/

您还可以按照以下步骤设置Umbraco 7应用程序,

  1. 安装Microsoft WebMatrix( http://www.microsoft.com/web/webmatrix/
  2. 打开WebMatrix->新建-> App Gallery
  3. 选择Umbraco CMS,然后单击下一步,然后按照说明进行操作。
  4. 完成后,您可以使用WebMatrix本身在umbraco上工作,也可以在Visual Studio中打开创建的网站来工作。

感谢所有人提供的替代解决方案,我只是发现这种情况不起作用是因为我需要为其新更新版本4更新Visual Studio 2012。

因此,如果有人在尝试通过Visual Studio 2012安装Umbraco 7时遇到此类错误

错误1

你调用的对象是空的。

[NullReferenceException: Object reference not set to an instance of an object.]
   Umbraco.Web.UmbracoModule.BeginRequest(HttpContextBase httpContext) +16
   Umbraco.Web.UmbracoModule.<Init>b__8(Object sender, EventArgs e) +253
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +136
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

错误2

The view '/umbraco/install/views/index.cshtml' or its master was not found or no view engine supports the searched locations. The following locations were searched:
/umbraco/install/views/index.cshtml

将Visual Studio 2012更新到版本4(最新)

  1. 工具类
  2. 扩展和更新
  3. 更新

只需在那里更新所有内容。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM