ChatGPT解决这个技术问题 Extra ChatGPT

Difference between ASP.NET Core (.NET Core) and ASP.NET Core (.NET Framework)

What is the difference between ASP.NET Core Web (.NET Core) vs ASP.NET Core Web (.NET Framework)?

and does .NET Framework provide similar performance as to .NET Core?

I can't access the link do to my firewall policies here at work. But the difference is that .NET Core is cross-platform compatible and doesn't use .NET Framework. The .NET Framework projects obviously use .NET Framework so the framework has to be installed on the server.

C
Community

This can be confusing at first, but it's important to remember: at the end of the day, "ASP.NET Core" is just a bunch of NuGet packages that can be installed in your project.

ASP.NET Core on .NET Core is cross-platform ASP.NET Core. It can run on Windows, Mac, and Linux (including Docker). The server doesn't need .NET Core installed - the dependencies can be bundled with the application.

ASP.NET Core on .NET Framework is ASP.NET Core on the "full" or "desktop" .NET Framework (e.g. .NET Framework 4.6.2). These applications can only run on Windows, but everything else about ASP.NET Core behaves the same way.

According to the benchmarks you linked, both will have higher performance than ASP.NET 4.6, although .NET Core is currently the highest:

ASP.NET 4.6: <50k req/sec ASP.NET Core (CLR): 400k req/sec ASP.NET Core (.NET Core, Linux): 900k req/sec ASP.NET Core (.NET Core, Windows): >1.1m req/sec

However, these benchmarks are slightly older (February 2016) and reflect pre-RTM code. I wouldn't be surprised if they've improved since then.


what is the purpose of having two underlying framework that you can build against? it's one more choice that you have to make to go to .net core or full .net framework to go with asp.net Core. is the goal that .net core does not have all needed functionality to build a web app yet so there is a need for full .net framework
@JustinHomes Applications and packages need to be ported to .NET Core, and sometimes that's difficult depending on the APIs they use. The option exists so you can use ASP.NET Core today on "full" .NET and then port to .NET Core in the future if you want the cross-platform capability.
@NateBarbettini Have already raised a question. stackoverflow.com/q/38237576/2056869
@NateBarbettini Does all nuget packages work if the ASP.NET Core on .NET Framework (CLR) is used or will it be compatibility issues due to ASP.NET Core?
@JonasAxelsson Yes, if the packages support the CLR (i.e. netstandard1.1 or higher, or net451 or higher).
N
Nayas Subramanian

ASP.NET Core with .NetCore is a cross-platform (it can run on Windows, Linux or other platforms), high-performance, open-source framework for building modern, cloud-based, Internet-connected applications. It has ability to host on IIS, Nginx, Apache, Docker, or self-host in your own process.

ASP.NET Core ships entirely as NuGet packages. This allows you to optimize your app to include only the necessary NuGet packages. In fact, ASP.NET Core 2.x apps targeting .NET Core only require a single NuGet package. The benefits of a smaller app surface area include tighter security, reduced servicing, and improved performance.

It is not required to install .Net framework to run asp.net core with .net core application. An ASP.NET Core application with .net core is a console app that creates a web server in its Main method. It uses Kestrel web server to run the application.

We can also use editors such Visual Studio Code, Atom to run the application.

It doesn't support Aspx, WPF, WCF and WebServices as if now. It supports inbuilt dependency injection. Uses coreclr which is the runtime in asp.net core with .net core.

Asp.Core with .Net framework .Net framework on the other hand started much before 2005 and it kept on adding new features making it a bit complex framework and heavier. It is not cross platform. It supports Aspx, WPF, WCF and WebServices

https://i.stack.imgur.com/hG22P.png

https://i.stack.imgur.com/nWPth.png


N
Nathan Alard

ASP.NET CORE using .NET Core - all dependencies are self-contained, can use most nuget packages, cant use windows specific packages, can execute on windows, linux, Mac

ASP.NET CORE using .NET Framework - most dependencies are self-contained, only executes on windows, will have access to windows specific nuget packages, needs the .net framework version which is targeted installed on the machine


this is copy of another answer