.NET Framework vs .NET Core
Now we understand that .NET Framework and .NET Core are two different .NET implementations, therefore, both can be compared.
- .NET Framework
The .NET Framework is the first implementation of .NET which works on Windows only
Its source code is public but Microsoft doesn’t accept third party contributions for it
It has a very rich desktop top development framework for windows which include Windows Forms and WPF
A huge third-party packages library is also available for it
It doesn’t support the in-app deployment model
Although it can be used with a docker container, its image size is large and can only be deployed on Windows containers
.NET Core 1. .NET Core is the latest implementation of .NET which runs on Windows, Linux, and macOS 2. Its open-source and Microsoft accepts third party contribution to .NET Core 3. It supports desktop frameworks like Windows Forms and WPF from version 3.0 4. The .NET Core also has support for a large number of third party packages as well but still, it doesn’t compete with .NET Framework in this area 5. It does support in-app deployment model 6. It is the best choice to work with docker containers
.NET Framework and .NET Core vs .NET Standard
Because .NET Framework and .NET Core are .NET implementations, therefore, we can compare them together against the .NET Standard.
- .NET Framework and .NET Core
The .NET Framework and .NET Core are implementations of .NET
Both frameworks have runtime which manages the execution of applications
The base class library is also a part of both frameworks
We can create different types of projects in either framework
- .NET Standard
The .NET Standard is a specification and not a .NET implementation
It specifies a set of APIs that all the .NET implementations have to implement
We can create only class library type projects with it
Deciding Target Platform and Version Let’s discuss what point should we keep in mind while choosing the target platform and their versions. We should use the .NET Core:
While developing applications for cross-platform
For the development of microservices
When we want to use Docker containers
To develop high-performance and scalable systems
- Use the .NET Framework when:
We want to target only Windows
Our application uses some third party packages which are not supported by .NET Core
The application uses .NET technologies that are not available for .NET Core
- .NET Standard should be the choice when:
We want to share our common code across different .NET implementations
Once we choose the right platform and project type for our application, the next step is to use the correct version. Let’s suppose that we have to target both, the .NET Framework and .NET Core and we also want to share the common code across both of these platforms.