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

asp.net – AspNetCore.Mvc与AspNetCore.Mvc.Core

发布时间:2020-12-16 06:40:04 所属栏目:asp.Net 来源:网络整理
导读:AspNetCore.Mvc和AspNetCore.Mvc.Core NuGet包之间有什么区别? Mvc是一个包罗万象的包裹,Mvc.Core只是骨头吗?这就是我从 here和 here的描述中猜到的,但这并不完全清楚. 解决方法 见 https://github.com/aspnet/Mvc/issues/4785 AspNetCore.Mvc已经为您设置
AspNetCore.Mvc和AspNetCore.Mvc.Core NuGet包之间有什么区别? Mvc是一个包罗万象的包裹,Mvc.Core只是骨头吗?这就是我从 here和 here的描述中猜到的,但这并不完全清楚.

解决方法

见 https://github.com/aspnet/Mvc/issues/4785

AspNetCore.Mvc已经为您设置了所有基本内容

如果你想使用AspNetCore.Mvc.Core,你必须自己配置它们

使用AspNetCore.Mvc似乎是明智的,除非你知道你需要AspNetCore.Mvc.Core

  • If you use .AddMvc() then you get a lot of “opinionated” features,e.g. what kind of app are you building,which formatters are registered and in what order,which application conventions are there by default.
  • If you use .AddMvcCore() (“and you know what you’re doing) then the behavior of your application will be decided by your own opinions and not the built-in default opinions.

(编辑:李大同)

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

    推荐文章
      热点阅读