加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

asp.net-mvc-3 – 命名空间’Sitecore’中不存在“内核”

发布时间:2020-12-16 06:31:42 所属栏目:asp.Net 来源:网络整理
导读:遇到奇怪的Sitecore错误.使用MVC将Sitecore 6.6中的布局应用于几个不同的内容项,我收到此错误: c:WindowsMicrosoft.NETFramework64v4.0.30319Temporary ASP.NET Filesroot95ad0ba420f230f7App_Web__sitecorelayout.cshtml.5d96958d.682ppzj_.0.cs(
遇到奇怪的Sitecore错误.使用MVC将Sitecore 6.6中的布局应用于几个不同的内容项,我收到此错误:

c:WindowsMicrosoft.NETFramework64v4.0.30319Temporary ASP.NET Filesroot95ad0ba420f230f7App_Web__sitecorelayout.cshtml.5d96958d.682ppzj_.0.cs(24): error CS0234: The type or namespace name 'Kernel' does not exist in the namespace 'Sitecore' (are you missing an assembly reference?)

System.Web.HttpCompileException (0x80004005): c:WindowsMicrosoft.NETFramework64v4.0.30319Temporary ASP.NET Filesroot95ad0ba420f230f7App_Web__sitecorelayout.cshtml.5d96958d.682ppzj_.0.cs(24): error CS0234: The type or namespace name 'Kernel' does not exist in the namespace 'Sitecore' (are you missing an assembly reference?)
at System.Web.Compilation.AssemblyBuilder.Compile()
at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath,Boolean noBuild,Boolean allowCrossApp,Boolean allowBuildInPrecompile,Boolean throwIfNotFound,Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context,VirtualPath virtualPath,Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath,HttpContext context,Boolean throwIfNotFound)
at System.Web.Mvc.BuildManagerWrapper.System.Web.Mvc.IBuildManager.FileExists(String virtualPath)
at System.Web.Mvc.VirtualPathProviderViewEngine.GetPathFromSpecificName(ControllerContext controllerContext,String name,String cacheKey,String[]& searchedLocations)
at System.Web.Mvc.VirtualPathProviderViewEngine.GetPath(ControllerContext controllerContext,String[] locations,String[] areaLocations,String locationsPropertyName,String controllerName,String cacheKeyPrefix,Boolean useCache,String[]& searchedLocations)
at System.Web.Mvc.VirtualPathProviderViewEngine.FindPartialView(ControllerContext controllerContext,String partialViewName,Boolean useCache)
at System.Web.Mvc.ViewEngineCollection.Find(Func`2 lookup,Boolean trackSearchedPaths)
at System.Web.Mvc.HtmlHelper.FindPartialView(ViewContext viewContext,ViewEngineCollection viewEngineCollection)
at System.Web.Mvc.HtmlHelper.RenderPartialInternal(String partialViewName,ViewDataDictionary viewData,Object model,TextWriter writer,ViewEngineCollection viewEngineCollection)
at System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper,ViewDataDictionary viewData)
at Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer)
at Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Render(Renderer renderer,RenderRenderingArgs args)
at Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Process(RenderRenderingArgs args)
at (Object,Object[] )
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
at Sitecore.Mvc.Pipelines.PipelineService.RunPipeline[TArgs](String pipelineName,TArgs args)
at Sitecore.Mvc.Presentation.RenderingView.Render(ViewContext viewContext,TextWriter writer)
at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.b__19()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter,ResultExecutingContext preContext,Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter,Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext,IList`1 filters,ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext,String actionName)

事情被设置为IIS中的构建和应用程序池的4框架.我不知所措.这种情况发生在同一场景中的任何人身上吗?

解决方法

该问题是在Views目录中的web.config文件的名称空间部分中添加了Sitecore.Kernel名称空间的结果.删除它解决了问题.

使用Sitecore支持来解决问题.大约半个小时前就知道了.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读