Microsoft has two main frameworks to build software, .NET Framework and .NET Core.
Microsoft announced its .NET Framework in 2001. The .NET Framework is 19 years old. That means, the needs of software frameworks was different at that time. The needs of a modern software framework is different today. The current version of .NET Framework is 4.8 and there will be no more versions of the .NET Framework.
.NET Core is a modern, open-source, multi-platform, and multi-purpose platform to build modern, fast, and scalable software. .NET Core is designed to build today and tomorrow’s modern applications. .NET Core is open source and has a large community behind it.
In this blog, I will talk about the advantages and disadvantages of .NET Core and .NET Framework.
Advantages of .NET Core
- .NET Core is a brand new, rewritten, and modern replacement of .NET Framework.
- .NET Core can work on multiple platforms such as Windows, Linux and Mac operating systems which is not the case with .NET framework.
- .NET Core is open source and .NET framework is not.
- .NET Core is faster and scalable and designed to work with today’s modern libraries and languages.
- Entity Framework Core is better than the Entity framework used in .NET Framework with better mappings (such as AutoMapper),migrations and query performance.
- Microservices are present in .NET Core which comes under the SOA and easy to deploy in small parts.
- .NET Core 3 supports WPF and Windows Forms so developers can build modern Windows client applications.
- The features such as reflections are supported by .NET Core.
- The .NET is far lighter and more modular than the .NET Framework.
- If we want to use several versions of .NET in the same project side by side then .NET core is the preferred choice.
- .NET Core is much faster compared to .NET Framework.
Advantages of .NET framework
- .NET Core is not fully matured and is still evolving.
- WCF, WPF and Window Forms support is still being added to .NET Core.
- .NET Core does not have all the functionalities which are present in .NET Framework so far. Obviously, this will change in coming versions.
- Some 3rd party libraries are not supported by the .NET core so in those cases you need .NET framework.
- Feature such as Code access Security are not present in .NET core so .NET framework do have the edge in that case.
- You cannot use Xamarin with .NET Core at this point.
- Even though .NET Core supports VB and F# but that is not supported for all the projects types.
- In case we already have an application in .NET framework then no need to migrate the existing application to .NET Core.
- The material, documentation and tools available for .NET Framework are far more and more matured. compared to .NET Core. Even though .NET Core is catching up fast but there's still a long way to go.
- All API's of .NET Core are not tested and mature as they are very new compared to .NET Framework.
- .NET Core is still new and evolving. There will be many changes in .NET Core.
- There are not many jobs in the market for .NET Core developers.
The verdict
So, when should you use .NET Core vs .NET Framework? If you’re building a brand new application and .NET Core provides all the functionality you need, I recommend go with .NET Core. .NET Core is the future. .NET Core will continue to get better with each release.
If you have an existing application and are using some libraries that are not yet supported by .NET Core, you should continue to use .NET Framework.