【问题标题】:asp.net core 3.0 IModelBinderasp.net core 3.0 IModelBinder
【发布时间】:2019-10-17 00:43:20
【问题描述】:

在安装 Microsoft.AspNetCore.Mvc.2.2.0 nuget 之前,仅安装 asp.net core 3.0 (netcoreapp3.0) 且无法使用 3.0 版 nuget 之前,IModelBinder 无法被识别和编译。

在 asp.net core 3.0 应用程序中包含 2.2.0 nuget 可以吗? 还是我错过了什么。

【问题讨论】:

    标签: asp.net-core-3.0 custom-model-binder


    【解决方案1】:

    我正在构建一个实用程序类库。默认的 asp.net core 模板添加引用而不在 ItemGroup 中提及。

    在类库中,在项目文件中添加以下内容可解决此问题。

    <ItemGroup>
        <FrameworkReference Include="Microsoft.AspNetCore.App" />
    </ItemGroup>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-02-21
      • 2020-03-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-06-22
      相关资源
      最近更新 更多