Skip links


.Net Standard and CLI Commands


.NET Platform his now categorized in three frameworks and each of the framework has its own platform role for development that helps the developers to execute RAD – Rapid Application Development. These are mentioned as below.

  • .Net Framework
    • WPF – Windows Presentation Foundation
    • Windows Forms
    • Net – Web Platform
  • .Net Core
    • UWP – Universal Windows Platform
    • Net – Web Cross Platform
  • XAMARIN – (Cross Platform Hybrid Mobile applications)
    • iOS
    • OS X
    • Android

Each of these frameworks is different and used for specific needs of development. It had a basic issue that even after being from same family the code was not been able to re-use between them. To overcome this inherent flaw Microsoft comes up with .Net Standard to allow developers to reuse the code library among themselves.

.Net Standard

It is not a framework or platform but it defines the set of API specification which all platforms need to implement to be considered as a .Net Standard compliant.  This allows them to be shared across the framework and can be used as common base library. It is assisting .Net Developers to resolve the problem of reusing code as cross platforms libraries. Thus making it well managed reusable code.

 

 

Initially .Net Standard released with version 1.0 and gradually it enhanced and upgraded to 2.1 version. Each of the version has support of respective version of .Net Framework and latest version are backward compatible to support the older versions.

Version Compatibility Chart

Latest matrix of the version compatibility is available on https://github.com/dotnet/standard/blob/master/docs/versions.md

It covers most of the common base class library API’s which is necessary can be shared across platforms except few cases which will throw NotImplemented exception and like WebForms, Windows Forms, WPF, WCF, etc. and OS specific API’s like Registry, AppDomain, etc. are out of the .Net Standard specification.

.Net Core CLI Commands

This feature is one of the most important change which will allow developer to use the .Net commands without IDE. It consists of various commands.

The dotnet Command Line Interface is a cross platform command line tool for managing .Net command tasks such as Build, Run and many more.

Following are the list of commands which can be executed using dotnet command.

 

CommandFunction
dotnet buildBuilds a .NET Core application
dotnet msbuildProvides access to the MSBuild command line.
dotnet newInitializes a C# or F# project for a given template.
dotnet publishPublishes a .NET framework-dependent or self-contained application.
dotnet restoreRestores the dependencies for a given application.
dotnet runRuns the application from source.
dotnet slnOptions to add, remove, and list projects in a solution file.
dotnet storeStores assemblies in the runtime package store.
Basic CommandsProject Modification CommandsAdvanced Commands
testadd packagenuget delete
vstestadd referencenuget locals
packremove packagenuget push
migrateremove referencemsbuild
helplist referencedotnet install script
testadd packagenuget delete

Author:  Harshil Sheth

Return to top of page


Inquiry Form


Inquiry Form