How to Develop Apps with DotNet Framework and DotNet Core

Every DotNet platform has its specific Base Class Library (BCL) for developing applications. While developing an application using a particular version of the technology, you will be using its library for accessing shared code.

f:id:ninaddixit:20200525185110p:plain

DotNet framework | Image Resource: blogspot.com

Let us assume you develop an application with the DotNet Framework and consult its library for code-sharing. After a while, you might feel the need to develop some application using the DotNet Core 3.0 version. In doing so, you might be attempting to reuse the same code-sharing library developed in .Net Framework for commands like DotNet New, DotNet Run, and DotNet Test.

Can We Reuse the Shared Code Library for two Different Platforms?

It is not possible since you cannot use .Net Core Base Class Library in another platform. Compatibility issues will spring up and prevent you from utilizing it.

Libraries targeting the .Net Framework can only be used for building apps of the same framework. On the other hand, the libraries targeting the .Net Core can support only applications that are compatible with it.

What is the Right Solution to the Compatibility Problem?

DotNet Standard yields appropriate solution to your problems. .Net Standard is a common specification for different API sets that are compatible with DotNet Core 3.0 or any other DotNet platform.

Matching any .NetRuntime will get easier if you use .Net Standard for developing the Base Class Library. You must pick .Net Standard when you are willing to develop some application and preserve your shared code into the Base Class Library. Remember, that it is portable with both DotNet Core 3.0 and DotNet Framework.

How is the Backward Compatibility of .Net Standard?

Every .Net Standard version few common API sets like that of System.Collections and System Data. By introducing a new version of the .Net standard, you will be able to access all earlier versions of API sets besides few other new APIs.

It gives out a clear indication that the latest .Net Standard version bears all API sets right from the scratch till the end. Availability of more APIs is ensured when you use a higher .Net Standard version.

Other than the DotNet Framework, the .Net Standard is aligned with several other frameworks. You can find it out by checking its compatibility with any other framework.