【问题标题】:2sxc 9.10 Cannot assign method group to an implicitly-typed local variable2sxc 9.10 无法将方法组分配给隐式类型的局部变量
【发布时间】:2017-11-29 06:29:15
【问题描述】:

我有一个 2sxc 应用,在 Razor 模板中有一个列表和详细信息视图。我已经在一些网站上使用它没有问题。我通常会导出应用程序并将其导入新站点,它工作正常。但是,当我选择应用程序时,我目前在尝试使用 DNN 8.4 和 2sxc 9.10 中的应用程序时遇到错误:

Error: System.Web.HttpCompileException (0x80004005): c:\inetpub\vhosts\xxxxxxxxxx.co.nz\httpdocs\Portals\1\2sxc\Projects\_projectsSLS.cshtml(10): error CS0815: Cannot assign method group to an implicitly-typed local variable 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 noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) at System.Web.Compilation.BuildManager.GetCompiledType(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetCompiledType(String virtualPath) at ToSic.SexyContent.Engines.RazorEngine.CreateWebPageInstance() in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\2Sexy Content Razor\RazorEngine.cs:line 71 at ToSic.SexyContent.Engines.RazorEngine.InitWebpage() in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\2Sexy Content Razor\RazorEngine.cs:line 106 at ToSic.SexyContent.Engines.RazorEngine.Init() in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\2Sexy Content Razor\RazorEngine.cs:line 26 at ToSic.SexyContent.Engines.EngineBase.Init(Template template, App app, ModuleInfo hostingModule, IDataSource dataSource, InstancePurposes instancePurposes, SxcInstance sxcInstance, Log parentLog) in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\SexyContent\Engines\EngineBase.cs:line 58 at ToSic.SexyContent.SxcInstance.GetRenderingEngine(InstancePurposes renderingPurpose) in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\SexyContent\SxcInstance.cs:line 265 at ToSic.SexyContent.SxcInstance.Render() in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\SexyContent\SxcInstance.cs:line 222

这通常只是运行。关于问题可能是什么的任何建议?

我在尝试运行带有 2 Pages 应用程序的简单父/子应用程序时遇到同样的错误。

【问题讨论】:

    标签: dotnetnuke 2sxc


    【解决方案1】:

    这可能是由于 9.3 或 9.8 中的微小破坏性更改。 2sxc 9.14 为您提供了更好的错误消息,因此您可以自己修复它,但它基本上将您指向这篇博文:https://2sxc.org/en/blog/post/fixing-the-breaking-change-on-tosic-eav-ientity-in-2sxc-9-3 或这个https://2sxc.org/en/blog/post/fixing-the-breaking-change-in-2sxc-9-8-list-instead-of-dictionary

    【讨论】:

      猜你喜欢
      • 2013-11-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-05-13
      相关资源
      最近更新 更多