What's the difference between .NET Core, .NET Framework, and Xamarin?

206,614

Solution 1

You should use .NET Core, instead of .NET Framework or Xamarin, in the following 6 typical scenarios according to the documentation here.

1. Cross-Platform needs

Clearly, if your goal is to have an application (web/service) that should be able to run across platforms (Windows, Linux and MacOS), the best choice in the .NET ecosystem is to use .NET Core as its runtime (CoreCLR) and libraries are cross-platform. The other choice is to use the Mono Project.

Both choices are open source, but .NET Core is directly and officially supported by Microsoft and will have a heavy investment moving forward.

When using .NET Core across platforms, the best development experience exists on Windows with the Visual Studio IDE which supports many productivity features including project management, debugging, source control, refactoring, rich editing including Intellisense, testing and much more. But rich development is also supported using Visual Studio Code on Mac, Linux and Windows including intellisense and debugging. Even third party editors like Sublime, Emacs, VI and more work well and can get editor intellisense using the open source Omnisharp project.

2. Microservices

When you are building a microservices oriented system composed of multiple independent, dynamically scalable, stateful or stateless microservices, the great advantage that you have here is that you can use different technologies/frameworks/languages at a microservice level. That allows you to use the best approach and technology per micro areas in your system, so if you want to build very performant and scalable microservices, you should use .NET Core. Eventually, if you need to use any .NET Framework library that is not compatible with .NET Core, there’s no issue, you can build that microservice with the .NET Framework and in the future you might be able to substitute it with the .NET Core.

The infrastructure platform you could use are many. Ideally, for large and complex microservice systems, you should use Azure Service Fabric. But for stateless microservices you can also use other products like Azure App Service or Azure Functions.

Note that as of June 2016, not every technology within Azure supports the .NET Core, but .NET Core support in Azure will be increasing dramatically now that .NET Core is RTM released.

3. Best performant and scalable systems

When your system needs the best possible performance and scalability so you get the best responsiveness no matter how many users you have, then is where .NET Core and ASP.NET Core really shine. The more you can do with the same amount of infrastructure/hardware, the richer the experience you’ll have for your end users – at a lower cost.

The days of Moore’s law performance improvements for single CPUs does not apply anymore; yet you need to do more while your system is growing and need higher scalability and performance for everyday’ s more demanding users which are growing exponentially in numbers. You need to get more efficient, optimize everywhere, and scale better across clusters of machines, VMs and CPU cores, ultimately. It is not just a matter of user’s satisfaction; it can also make a huge difference in cost/TCO. This is why it is important to strive for performance and scalability.

As mentioned, if you can isolate small pieces of your system as microservices or any other loosely-coupled approach, it’ll be better as you’ll be able to not just evolve each small piece/microservice independently and have a better long-term agility and maintenance, but also you’ll be able to use any other technology at a microservice level if what you need to do is not compatible with .NET Core. And eventually you’d be able to refactor it and bring it to .NET Core when possible.

4. Command line style development for Mac, Linux or Windows.

This approach is optional when using .NET Core. You can also use the full Visual Studio IDE, of course. But if you are a developer that wants to develop with lightweight editors and heavy use of command line, .NET Core is designed for CLI. It provides simple command line tools available on all supported platforms, enabling developers to build and test applications with a minimal installation on developer, lab or production machines. Editors like Visual Studio Code use the same command line tools for their development experiences. And IDE’s like Visual Studio use the same CLI tools but hide them behind a rich IDE experience. Developers can now choose the level they want to interact with the tool chain from CLI to editor to IDE.

5. Need side by side of .NET versions per application level.

If you want to be able to install applications with dependencies on different versions of frameworks in .NET, you need to use .NET Core which provides 100% side-by side as explained previously in this document.

6. Windows 10 UWP .NET apps.

In addition, you may also want to read:

  1. When should I NOT use .NET Core?
  2. When should I still use .NET Framework 4.x, instead of .NET Core?
  3. When should I use Xamarin, instead of .NET Core?

Solution 2

This is how Microsoft explains it:

.NET Framework, .NET Core, Xamarin

.NET Framework is the "full" or "traditional" flavor of .NET that's distributed with Windows. Use this when you are building a desktop Windows or UWP app, or working with older ASP.NET 4.6+.

.NET Core is cross-platform .NET that runs on Windows, Mac, and Linux. Use this when you want to build console or web apps that can run on any platform, including inside Docker containers. This does not include UWP/desktop apps currently.

Xamarin is used for building mobile apps that can run on iOS, Android, or Windows Phone devices.

Xamarin usually runs on top of Mono, which is a version of .NET that was built for cross-platform support before Microsoft decided to officially go cross-platform with .NET Core. Like Xamarin, the Unity platform also runs on top of Mono.


A common point of confusion is where ASP.NET Core fits in. ASP.NET Core can run on top of either .NET Framework (Windows) or .NET Core (cross-platform), as detailed in this answer: Difference between ASP.NET Core (.NET Core) and ASP.NET Core (.NET Framework)

Solution 3

You can refer in this line - Difference between ASP.NET Core (.NET Core) and ASP.NET Core (.NET Framework)

.NET Framework, .NET Core, Xamarin

Xamarin is not a debate at all. When you want to build mobile (iOS, Android, and Windows Mobile) apps using C#, Xamarin is your only choice.

The .NET Framework supports Windows and Web applications. Today, you can use Windows Forms, WPF, and UWP to build Windows applications in .NET Framework. ASP.NET MVC is used to build Web applications in .NET Framework.

.NET Core is the new open-source and cross-platform framework to build applications for all operating system including Windows, Mac, and Linux. .NET Core supports UWP and ASP.NET Core only. UWP is used to build Windows 10 targets Windows and mobile applications. ASP.NET Core is used to build browser based web applications.

you want more details refer this links
https://blogs.msdn.microsoft.com/dotnet/2016/07/15/net-core-roadmap/ https://docs.microsoft.com/en-us/dotnet/articles/standard/choosing-core-framework-server

Solution 4

  1. .NET is the Ecosystem based on c# language
  2. .NET Standard is Standard (in other words, specification) of .NET Ecosystem .

.Net Core Class Library is built upon the .Net Standard. .NET Standard you can make only class-library project that cannot be executed standalone and should be referenced by another .NET Core or .NET Framework executable project.If you want to implement a library that is portable to the .Net Framework, .Net Core and Xamarin, choose a .Net Standard Library

  1. .NET Framework is a framework based on .NET and it supports Windows and Web applications

(You can make executable project (like Console application, or ASP.NET application) with .NET Framework

  1. ASP.NET is a web application development technology which is built over the .NET Framework
  2. .NET Core also a framework based on .NET.

It is the new open-source and cross-platform framework to build applications for all operating system including Windows, Mac, and Linux.

  1. Xamarin is a framework to develop a cross platform mobile application(iOS, Android, and Windows Mobile) using C#

Implementation support of .NET Standard[blue] and minimum viable platform for full support of .NET Standard (latest: [https://docs.microsoft.com/en-us/dotnet/standard/net-standard#net-implementation-support])

Solution 5

.NET 5 will be a unified version of all .NET variants coming in November 2020, so there will be no need to choose between variants anymore. enter image description here

Share:
206,614
MeeChao
Author by

MeeChao

Updated on July 08, 2022

Comments

  • MeeChao
    MeeChao almost 2 years

    Microsoft now has .NET Core, .NET Framework and Xamarin (Mono) in its family.

    It seems to be a lot of overlap here. What's the difference between these types of .NET Platforms? When should I choose to use .NET Core in my project, instead of .NET Framework or Xamarin?

  • Juan Zamudio
    Juan Zamudio over 7 years
    Why asp.net Core is more performant? Why is better when you are building microservices?
  • Hussain Mansoor
    Hussain Mansoor about 7 years
    Now Visual Studio for Mac is also available. So one more positive point towards .NET Core. visualstudio.com/vs/visual-studio-mac
  • HASSAN MD TAREQ
    HASSAN MD TAREQ over 6 years
    Whenever someone says .NET Core is cross-platform, a new developer gets confused. '.NET Core' supports UWP + ASP.NET Core only & ASP.NET Core is cross-platform, UWP is not.
  • Nate Barbettini
    Nate Barbettini over 6 years
    @HassanTareq That's not quite correct. .NET Core refers to the runtime and libraries that can run on Windows, Mac, or Linux. ASP.NET Core is cross-platform because .NET Core is cross-platform.
  • HASSAN MD TAREQ
    HASSAN MD TAREQ over 6 years
    Then it would be helpful for greenhorns if you mention that Although .Net core (run-time and libraries) is cross platform, we can not use UWP app in Mac/Linux. UWP is not cross-platform, I expected UWP to be cross-platform alternative of WPF (Xamarin.Forms is)
  • Nate Barbettini
    Nate Barbettini over 6 years
    @HassanTareq Good suggestion, I've edited my answer.
  • shaneparsons
    shaneparsons over 6 years
    Your links are broken
  • Peter Wone
    Peter Wone about 6 years
    @JuanZamudio Versions of the framework are monolithic layers, each dependent on the immediately prior version, in a dependency chain back to version 2.0 which wholly replaced 1.1. As a result, if you use anything from 4.5 you implicitly depend on everything ever right back to 2.0. The Core framework is more about refactoring dependencies to eliminate irrelevant baggage than rewriting the API, which is mostly but not entirely unchanged. Some things also got massively simplified, like EF Core.
  • Dishant
    Dishant almost 6 years
    UWP runs on .NET Core and not on .NET Framework. Correct me if I am wrong. For Reference
  • Jason Boyd
    Jason Boyd over 5 years
    I would say .Net Core is what you should be using if you must run on Linux or Linux and Windows. But you could make that case for Mono as well, I think. It certainly does not have more features. By definition it is only the "core" bits, it has none of the Windows-only bits, hence, fewer features. And I am just guessing but it seems unlikely that .Net Core has fewer bugs. The .Net Framework has been out in the world for almost two decades. I would imagine it is pretty battle-hardened at this point. But that is just a guess.
  • Sean Anderson
    Sean Anderson over 5 years
    Xamarin Forms now runs on nearly everything from one code base. Windows UWP desktop, WPF desktop, MacOS, iOS, Android, and Tizen (TVs). The default is to target .NET Standard from the Core implementation. Good times!
  • asdf
    asdf over 5 years
    It certainly has more new features, they recently added new classes that will not be added to .NET 4.8. They also ported WPF and WinForms. Actually it looks like .NET Core could replace .NET Framework. It seems to be more performant either.
  • Vincent
    Vincent about 4 years
    They differ only in one thing: MS will drop Core in nearest 5 years. While programmer still use .NET FW 4.8 and WinForms/WPF.
  • Vincent
    Vincent about 4 years
    It's a lie. .NET Core cannot support WPF/WinForms on Linux!
  • yanlend
    yanlend about 4 years
    That's true, but other variants of .NET did not support that either. The choice for a variant of .NET is gone, which is a good thing.
  • shox
    shox about 4 years
    Hmm.. well aside from missing the 3rd option (.net framework) it's not entirely true. .NET core can be used on pretty much everything (Web, Desktop, Mobile, Cloud, Gaming, IoT etc). .NET Framework is windows centric and was entirely closed. Mono was the open source (community driven) version of .NET Framework used by Xamarin which put cross platform mobile tooling on top of mono. Xamarin will eventually be replaced, most likely by Blazor (currently pwa, but hybrid then native are part of the road map).
  • user10868910
    user10868910 about 4 years
    It is true. Xamarin is for mobile applications. I don't think it will be replaced soon. ASMX is still used for Web Services, and included in Visual 2019.
  • BlueRaja - Danny Pflughoeft
    BlueRaja - Danny Pflughoeft about 3 years
    The third box should be "Mono", which is another implementation of the .Net Standard. Xamarin is not, it's just a cross-platform library which runs on top of Mono (or used to??). To make things more confusing, Xamarin (the company) bought Mono (the company), and both were later bought by Microsoft.