zoukankan      html  css  js  c++  java
  • Orchard Core 版本冲突 The type 'FormTagHelper' exists in both 'Microsoft.AspNetCore.Mvc.TagHelpers, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' and...

    最近老大让我看Orchard Core,这是一个CMS系统。可以先参考大佬的文章:https://www.cnblogs.com/shanyou/archive/2018/09/25/9700422.html

    我新建了一个空项目,更改Startup.cs

    然后启动项目,想着应该可以正常运行,可是报了下面这个错误:

    • The type 'RazorViewAttribute' exists in both 'Microsoft.AspNetCore.Mvc.Razor, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' and 'Microsoft.AspNetCore.Mvc.Razor, Version=2.1.3.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'

      1. [assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@"/.Modules/OrchardCore.Setup/Views/Setup/Index.cshtml", typeof(AspNetCore.__Modules_OrchardCore_Setup_Views_Setup_Index))]
    • The type '__Modules_OrchardCore_Setup_Views_Setup_Index' already contains a definition for '__Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper'

      1. private global::Microsoft.AspNetCore.Mvc.TagHelpers.SelectTagHelper __Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper;
    • The type 'FormTagHelper' exists in both 'Microsoft.AspNetCore.Mvc.TagHelpers, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' and 'Microsoft.AspNetCore.Mvc.TagHelpers, Version=2.1.3.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'

    • 这个看起来像是版本的冲突。折腾了一阵子,通过安装Microsoft.AspNetCore.Mvc解决了。

    • Install-Package Microsoft.AspNetCore.Mvc
  • 相关阅读:
    jquery之实例应用
    jquery之文档操作
    jquery之css操作
    jquery属性的操作
    jquery筛选器
    jquery选择器之表单选择表单对象属性
    jquery选择器之属性选择器
    jquery选择器之子元素
    数位dp基础
    Leetcode 5195. 最长快乐字符串(贪心)
  • 原文地址:https://www.cnblogs.com/SasaL/p/9881120.html
Copyright © 2011-2022 走看看