为什么要在 ASP.NET Core 中使用完整的 .NET Framework? [英] Why use the full .NET Framework with ASP.NET Core?

查看:31
本文介绍了为什么要在 ASP.NET Core 中使用完整的 .NET Framework?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据文档 此处.我试图理解为什么人们会选择 ASP.NET Core + 完整的 .NET Framework 的后一个选项?

With ASP.NET Core 1.0 release one can run on either .NET Core or the full .NET Framework per the documentation here. I'm trying to understand the latter option of why one would select ASP.NET Core + the full .NET Framework?

我了解完整的 .NET Framework 和 .NET Core 之间的区别.但是,如果我想使用完整的 .NET Framework,为什么不直接使用 ASP.NET 4.6?我认为这个想法是在 .NET Core 之上使用 ASP.NET Core 进行 1-2 次冲击,允许跨平台部署、模块化、部署到 Docker 容器的能力、性能等一系列好处.没有 .NET Core 我不知道不相信该列表中的任何内容仍然有效,那么完整的 .NET 框架 + ASP.NET Core 的用例是什么?如果没有 .NET Core,ASP.NET Core 本身还能为我提供什么?

I understand the difference between the full .NET Framework and .NET Core. However, if I wanted to use the full .NET Framework, why not just use ASP.NET 4.6? I thought the idea was a 1-2 punch with ASP.NET Core atop of .NET Core allowing the slew of benefits like cross platform deployment, modularization, ability to deploy to a Docker container, performance, etc. Without .NET Core I don't believe anything on that list is still valid, so what is the use case for the full .NET framework + ASP.NET Core? What does ASP.NET Core on it's own still provide to me without .NET Core?

推荐答案

.NET Core 带来了很多好处,例如跨平台部署、模块化、部署到 Docker 容器的能力、性能等.没有 .NET Core,我不相信该列表中的任何内容仍然有效

.NET Core allowing the slew of benefits like cross platform deployment, modularization, ability to deploy to a Docker container, performance, etc.. Without .NET Core I don't believe anything on that list is still valid

如果您选择完整的 .NET 框架而不是 .NET Core,那么唯一的好处就是跨平台.部署、模块化、docker、性能等的所有其他好处......仍然有效.

The only benefit you don't have if you choose the full .NET framework over .NET Core is being cross platform. All the other benefits of deployment, modularization, docker, performance, etc... are still valid.

我们实际上在完整框架上运行我们的 ASP.NET Core Web 应用程序,现在我们享受将依赖注入作为一等公民的好处,内置 NuGet,拥有一个精简的 HTTP 请求管道,这使我们的性能更好,开源(所以所有问题都可以通过对 GitHub 的短暂访问来解决)、模块化(在将近一年之后仍然必须遇到一些我们无法根据自己的需求进行定制的东西),等等.而且我们知道我们不需要在 Windows 之外的任何其他操作系统上进行部署,因此我们仍然可以拥有完整框架的所有优势.

We actually run our ASP.NET Core web app on the full framework and now we enjoy the benefits of having Dependency Injection as a 1st class citizen, having NuGet built in, having an lean HTTP request pipeline which makes our performance better, open sourced (so all the issues can be solved by a short visit to GitHub), modularity (still have to come across something we couldn't customize to our own needs after almost a year now), and so on. And we know we don't need to deploy on any other OS than Windows, so we can still have all the benefits of the full framework.

来自曾的更新

嗯,例如,您仍然可以在 Linux 下定位完整的 .NET Framework.你需要在那里安装单声道 4.6.有一些限制,因为并非所有类都在单声道中实现,但大多数是并且即将到来的情况(即加密)您必须解决

Well, you can still target full .NET Framework under Linux for example. There you need mono 4.6 installed there. There are some limitations as not all classes are implemented in mono, but a majority is and around the corner case (i.e. encryption) you have to work around

来自 atconway 的更新

还值得注意的是,当时 .NET Core 不支持 VB.NET,如果这是一项要求的话.

It's also worth noting at the time VB.NET is not supported by .NET Core if that's a requirement.

这篇关于为什么要在 ASP.NET Core 中使用完整的 .NET Framework?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆