gpt4 book ai didi

asp.net - AspNetCore.Mvc 与 AspNetCore.Mvc.Core

转载 作者:行者123 更新时间:2023-12-02 17:33:05 24 4
gpt4 key购买 nike

AspNetCore.Mvc 和 AspNetCore.Mvc.Core NuGet 包之间有什么区别? Mvc.Core 只是简单的东西,而 Mvc 是一个包罗万象的包吗?这就是我从描述中猜测的herehere但还不完全清楚。

最佳答案

参见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.

关于asp.net - AspNetCore.Mvc 与 AspNetCore.Mvc.Core,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38705336/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com