SlideShare a Scribd company logo
.NET Core + ASP.NET Core Training Course
Session 1
.NET Core
History Of .NET
History
.NET Core
About
Why .NET Core?
.NET Core
Google Trend
Why .NET?
.NET Core
TIOBE
Index for June 2016
Why .NET?
.NET Core
w3techs.com
Why .NET?
.NET Core
About
What is the .NET Core Platform?
• .NET Core is a cross-platform implementation of .NET Framework
• Main Goal: modular, performant and cross-platform execution environment for
modern applications
• .NET Core is a subset of the .NET Framework
• It’s primarily being driven by ASP.NET Core workloads
• .NET Core consists of the CoreCLR runtime and the CoreFX framework libraries
• A set of cross-platform tooling can be found in the .NET CLI
• The Roslyn compiler and LLILC compiler are sibling projects that support .NET Core
.NET Core
.NET Core is…
What is the .NET Core Platform?
32-bit and 64-bit Windows platforms, as well as on mac OS and Linux
manages memory with a garbage collector, compiles your code with a JIT compiler or ahead of time with .NET Native.
.NET Core is a set of runtime, library and compiler components.
Generics, Language Integrated Query (LINQ), Async support, "Roslyn" Managed compiler usable as a service
Streamlined and easy interoperability with native code
.NET Core
.NET Core is…
What is the .NET Core Platform?
Runtime modularity allows for an extensibility model, and componentization strategies with package manager NuGet
client applications, across web, server workloads to mobile apps
Platforms: OS and Processor Architectures | Application Stacks: Mono
Open ECMA standard, both its runtime and its class libraries
.NET Core
Console Application:
.NET Core Application Types: Console Application
• Cross-platform: Console apps can run on Windows, OS X, and Linux.
• Native compilation: This combines the benefits of a managed app with the
performance of a native C/C++ app.
.NET Core
Features
.NET Core Features
• Ease of Installation
• Because .NET Core is not an operating system component, installation:
• Does not require administrator privileges.
• Does not touch system components like operating system directories or, on Windows
systems, the Windows Registry.
• Is as simple as copying some files to a directory on the target computer or compiling
the framework natively into the app.
.NET Core
.NET Core has two deployment models:
.NET Core Deployment models: Portable Apps
• Portable Apps
• You will deploy only your app and any of its dependencies other than the .NET Core libraries
• A portable app requires that .NET Core is installed on the target machine in order for it to run
• .NET Core is an independent component so you do not need to determine in advance which
platforms your app supports
• Portable apps are the default app type in .NET Core
.NET Core
.NET Core has two deployment models:
.NET Core Deployment models: Self-contained Apps
• Self-contained Apps
• include all of their dependencies, including the .NET Core runtime, as part of the app
• .NET Core is local to your app so it can run on any supported platform whether .NET Core is
installed on it or not
• .NET libraries that your app uses are isolated from .NET Core libraries used by other apps
• Requires that you determine the target platforms that your app supports in advance
.NET Core
.NET Core Components
.NET Core Components
• Common Language Runtime: which in .NET Core is named CoreCLR
• CoreFX: a modular collection of libraries
• allows you to include the libraries that your app needs without the overhead of including those that you don't need
.NET Core
The Common Language Runtime
.NET Core Components: CLR
CoreCLR, or the common language runtime found in .NET Core, is a lightweight runtime that offers many of the same
services as the .NET Framework's common language runtime on the Windows desktop. These include:
• Garbage Collector
• provides automatic memory management
• Allocates and frees memory as needed; you do not have to do it programmatically
• .NET Core uses the same garbage collector as the .NET Framework
• Just-in-time (JIT) compiler
• compiles IL, or .NET intermediate language, to native machine code at runtime.
• On some architectures, the JIT compiler includes support for SIMD hardware acceleration
• An exception handling mechanism
• allows you to handle exceptions with try/catch statements
.NET Core
The Class Library
.NET Core Components: The Class Library
Is very much like the .NET Framework Class Library for the Windows desktop.
With one major difference: On the Windows desktop, it is a monolithic library that is part of the operating system and is
maintained by Windows Update.
On .NET Core it is a modular and factored collection of individual libraries organized by functionality
Microsoft.NetCore.App is included with the runtime and contains the basic types needed for all app development. Some of
these include:
• Primitives, such as the Boolean type, signed and unsigned integral types, floating-point types, and the Char structure.
• The String type, UTF-16 code units. .NET Core also includes a number of encoding types that let you convert UTF-16 encoded strings
to an array of bytes in other encodings. For example, you can use the UTF8Encoding class to convert a .NET Core string to a UTF-8
encoded byte array that represents a string on Linux.
.NET Core
The Class Library
.NET Core Components: The Class Library
• General-purpose exception classes, such as the ArgumentException, ArgumentNullException, and NullReferenceException types.
• The task types, such as Task and Task<T>, to support asynchronous programming.
• Basic threading types
• The Console class, to support the development of console apps.
• Other libraries are installed as NuGet packages
.NET Core
dotnet.exe
.NET Core Tools: CLI
• dotnet --help : Displays information about .NET Core CLI commands
• dotnet new : Initializes a new C# project
• dotnet new --lang F# : Initializes a new F# project.
• dotnet restore : Restores the dependencies for an app.
• dotnet build : Builds a .NET Core app.
• dotnet publish : Publishes a .NET portable or self-contained app. (See the "Ease of Deployment" section below.
• dotnet run : Runs the app from its source code.
• dotnet pack : Creates a NuGet package of your code.
dotnet.exe also has an extensibility model that lets you add additional commands.
.NET Core
Language Support and Development Environments
.NET Core Tools: Language Support and Development Environments
• Any programming language that targets .NET Core can be used to develop .NET Core app
• An app that targets .NET Core and is written in one programming language can seamlessly access types
and members in .NET Core libraries that were developed by using a different programming language
• You can currently develop .NET Core apps in either of two languages:
• C#, which is based on the .NET Compiler Platform, also known as Roslyn.
• F#.
• Additional languages are planned for the future
• Development Environments: Notepad, Visual Studio Code, Visual Studio 2015 Update 2 (and higher)
.NET Core
.NET Core vs .NET Framework 4.x
.NET Core vs .NET Framework 4.x
.NET Core
Includes CoreCLR, a more lightweight runtime that provides basic
services: automatic memory management and garbage collection,
along with a basic type library.
Includes CoreFx, a set of individual modular assemblies that you can
add to your app as needed. Unlike the .NET Framework 4.x you can
select only the assemblies that you need, suitable for a full range of
modern apps, including apps that operate on small devices with
constrained memory and storage.
Can be used to develop apps that take advantage of a number of
technologies, such as ASP .NET Core, WCF, WF
Can be app local. That is, the .NET Core implementation that your app
relies is tightly bound to your app. This mitigates versioning problems.
vs
.NET Framework 4.x
Includes CLR, a sizeable runtime that provides memory management,
isolation by application domain, and a host of other application
services.
Includes the .NET Framework Class Library, a large, monolithic library
with thousands of classes and many thousands of members. they are
always present and accessible.
Is suitable for developing traditional Windows desktop apps, including
Windows Forms (WinForms) and Windows Presentation Foundation
(WPF) apps.
ASP.NET and ASP.NET Web Forms, Windows Communication
Foundation (WCF), Workflow Foundation (WF
Is globally available on a given system. An app can include a chain
installer that installs a particular version of the .NET, this can create
versioning problems. Starting with Windows 8, a version of the .NET
Framework is installed as an operating system component and is serviced by
Windows Update.
.NET Core
.NET Standard
.NET Standard
.NET Framework 4.6.2 Preview and .NET Core both conform to the .NET Standard 1.5. They target different
platforms and represent different approaches to app development and deployment
• Experienced .NET Framework developers can easily adapt to developing with .NET Core when whey want
to target different platforms and devices.
• .NET Core developers can easily transition to developing apps with the .NET Framework that target
Windows desktop, tablet, and phone.
• Libraries written for the .NET Framework or .NET Core can easily be made to work on the other platform.
.NET Core
.NET Core implementations
.NET Core implementations
• ASP.NET Core
• . ASP.NET Core is a modular version of ASP.NET that combines ASP.NET MVC and the ASP.NET Web API.
• It runs on both the .NET Framework and .NET Core and is designed for building high-performance cloud and microservice apps
• It is not intended as a replacement to ASP.NET in the .NET Framework.
• .NET Native.
• .NET Native is a compilation and deployment technology for Universal Windows Platform (UWP) apps written in C# and Visual Basic.
• .NET Native compiles apps to native code, and statically links into an application's assemblies only those code elements from
.NET Core libraries and other third-party libraries that are actually used.
.NET Core
.NET Core implementations
.NET Core implementations
• Universal Windows Platform (UWP) apps.
• The UWP allows you to build a single app that can run on the Windows desktop, Windows tablet devices, and Windows Phone.
• These apps can also be placed in the Windows Store.
• UWP apps are compiled to native code for their target platforms by .NET Native.
.NET Core
.NET Core System Requirements
Installing .NET Core: System Requirements
• Windows client supported in both 32-bit and 64-bit editions
• Windows 7 SP1, Windows 8.1, Windows 10
• Windows Server 2008 R2 SP1, 2012 SP1, 2012 R2 SP1 (Full Server or Server Core)
• Windows Server 2016 (Full Server, Server Core or Nano Server)
• Linux
• CentOS 7.1, Debian 8.2, Red Hat Enterprise Linux 7.2, Ubuntu 14.04 LTS
• OS X
• OS X 10.11 (El Capitan) and above
.NET Core
.NET Core Software Development Kit (SDK) Overview
Installing .NET Core: .NET Core Software Development Kit (SDK) Overview
.NET Core Software Development Kit is a set of libraries and tools that allow developers to create .NET Core
applications and libraries. It contains the following components:
• The .NET Core Command Line Tools that are used to build applications
• .NET Core (libraries and runtime) that allow applications to both be built and run
• The dotnet driver for running the CLI commands as well as running applications
.NET Core
Acquiring the .NET Core SDK
Installing .NET Core: .NET Core Software Development Kit (SDK) Overview
• The native installers are primarily meant for developer's machines. DEB packages on Ubuntu or MSI bundles on
Windows. These installers will install and set up the environment as needed for the user to use the SDK
immediately after the install and they require administrative privileges on the machine.
• Install scripts, do not require administrative privileges. They will also not install any prerequisites on the machine;
you need to install all of the pre-requisites manually. The scripts are meant mostly for setting up build servers or
when you wish to install the tools without admin privileges.
By default, the SDK will install in a "side-by-side" (SxS) manner means that multiple versions of the CLI tools can coexist
at any given time on a single machine.
.NET Core
https://www.microsoft.com/net/download#core
Installing .NET Core
.NET Core
Step by Step Hello World with .NET Core
.NET Core: Hello World 
$ dotnet new
dotnet new creates an up-to-date project.json file with NuGet dependencies necessary to build a console app. It also creates a Program.cs, a
basic file containing the entry point for the application.
.NET Core
project.json
.NET Core: Hello World 
.NET Core
$ dotnet restore
.NET Core: Hello World 
dotnet restore calls into NuGet to restore the tree of dependencies.
NuGet analyzes the project.json file, downloads the dependencies stated in the file (or grabs them
from a cache on your machine), and writes the project.lock.json file.
The project.lock.json file is necessary to be able to compile and run.
The project.lock.json file is a persisted and complete set of the graph of NuGet dependencies and
other information describing an app. This file is read by other tools, such as dotnet build and dotnet
run, enabling them to process the source code with a correct set of NuGet dependencies and binding
resolutions.
.NET Core
$ dotnet run
.NET Core: Hello World 
dotnet run calls dotnet build to ensure that the build targets have been built, and then calls dotnet <assembly.dll>
to run the target application.
You can also execute dotnet build to compile and the code without running the build console applications.
.NET Core
Building a self-contained application
.NET Core: Hello World 
Change the project.json file to direct the tools to build a self-contained application.
The first change is to remove the "type": "platform" element from all dependencies. This project's only dependency so far
is "Microsoft.NETCore.App". The dependencies section should look like this:
.NET Core
Building a self-contained application
.NET Core: Hello World 
Change the project.json file to direct the tools to build a self-contained application.
The first change is to remove the "type": "platform" element from all dependencies. This project's only dependency so far is
"Microsoft.NETCore.App". The dependencies section should look like this:
Next, you need to add a runtimes node to specify all the target execution environments. The build system will generate native executables
for the current environment. After making those two changes, execute dotnet restore, followed by dotnet build to create the native executable.
RID Catalog
.NET Core
Building a self-contained application
.NET Core: Hello World 
Notice that the native application takes slightly longer to build, but executes slightly faster. This behavior becomes more
noticeable as the application grows.
The build process generates several more files when your project.json creates a native build. These files are
created in binDebugnetcoreapp1.0<platform> where <platform> is the RID chosen.
In addition to the project's HelloNative.dll there is a HelloNative.exe that loads the runtime and starts the
application
.NET Core
Executing on a machine that does not include the .NET runtime
.NET Core: Hello World 
Use the dotnet publish command to create a new subdirectory under the ./bin/Debug/netcoreapp1.0/<platform>
directory called publish. It copies the executable, all dependent DLLs and the framework to this sub directory
package that directory to another machine (or a container) and execute the application there.
That application is a portable application which is the default type of application for .NET Core and requires that .NET Core
is installed on the target machine. Portable applications can be built on one machine and executed anywhere.
Native applications must be built separately for each target machine. dotnet publish creates a directory that has the
application's DLL, and any dependent dlls that are not part of the platform installation.
.NET Core
Samples
.NET Core: Hello World 
1. Hello
2. HelloNative
3. Fibonacci
4. FibonacciBetter
5. NewTypes

More Related Content

What's hot

.Net Core
.Net Core.Net Core
DevOps with Kubernetes
DevOps with KubernetesDevOps with Kubernetes
DevOps with Kubernetes
EastBanc Tachnologies
 
Jenkins CI
Jenkins CIJenkins CI
Jenkins CI
Viyaan Jhiingade
 
Introduction to Docker Compose
Introduction to Docker ComposeIntroduction to Docker Compose
Introduction to Docker Compose
Ajeet Singh Raina
 
Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad
Docker, Inc.
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
Phuc Nguyen
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to dockerJohn Willis
 
Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes Workshop
Bob Killen
 
CD using ArgoCD(KnolX).pdf
CD using ArgoCD(KnolX).pdfCD using ArgoCD(KnolX).pdf
CD using ArgoCD(KnolX).pdf
Knoldus Inc.
 
Kubernetes 101 for Beginners
Kubernetes 101 for BeginnersKubernetes 101 for Beginners
Kubernetes 101 for Beginners
Oktay Esgul
 
Clean architecture
Clean architectureClean architecture
Clean architecture
.NET Crowd
 
Achieving CI/CD with Kubernetes
Achieving CI/CD with KubernetesAchieving CI/CD with Kubernetes
Achieving CI/CD with Kubernetes
Ramit Surana
 
Understanding Monorepos
Understanding MonoreposUnderstanding Monorepos
Understanding Monorepos
Benjamin Cabanes
 
Jenkins presentation
Jenkins presentationJenkins presentation
Jenkins presentation
Valentin Buryakov
 
Continuous Delivery with Jenkins
Continuous Delivery with JenkinsContinuous Delivery with Jenkins
Continuous Delivery with Jenkins
Jadson Santos
 
Docker 101: An Introduction
Docker 101: An IntroductionDocker 101: An Introduction
Docker 101: An Introduction
POSSCON
 
Jenkins
JenkinsJenkins
Continuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CIContinuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CI
David Hahn
 
Docker Basic to Advance
Docker Basic to AdvanceDocker Basic to Advance
Docker Basic to Advance
Paras Jain
 
presentation on Docker
presentation on Dockerpresentation on Docker
presentation on Docker
Virendra Ruhela
 

What's hot (20)

.Net Core
.Net Core.Net Core
.Net Core
 
DevOps with Kubernetes
DevOps with KubernetesDevOps with Kubernetes
DevOps with Kubernetes
 
Jenkins CI
Jenkins CIJenkins CI
Jenkins CI
 
Introduction to Docker Compose
Introduction to Docker ComposeIntroduction to Docker Compose
Introduction to Docker Compose
 
Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes Workshop
 
CD using ArgoCD(KnolX).pdf
CD using ArgoCD(KnolX).pdfCD using ArgoCD(KnolX).pdf
CD using ArgoCD(KnolX).pdf
 
Kubernetes 101 for Beginners
Kubernetes 101 for BeginnersKubernetes 101 for Beginners
Kubernetes 101 for Beginners
 
Clean architecture
Clean architectureClean architecture
Clean architecture
 
Achieving CI/CD with Kubernetes
Achieving CI/CD with KubernetesAchieving CI/CD with Kubernetes
Achieving CI/CD with Kubernetes
 
Understanding Monorepos
Understanding MonoreposUnderstanding Monorepos
Understanding Monorepos
 
Jenkins presentation
Jenkins presentationJenkins presentation
Jenkins presentation
 
Continuous Delivery with Jenkins
Continuous Delivery with JenkinsContinuous Delivery with Jenkins
Continuous Delivery with Jenkins
 
Docker 101: An Introduction
Docker 101: An IntroductionDocker 101: An Introduction
Docker 101: An Introduction
 
Jenkins
JenkinsJenkins
Jenkins
 
Continuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CIContinuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CI
 
Docker Basic to Advance
Docker Basic to AdvanceDocker Basic to Advance
Docker Basic to Advance
 
presentation on Docker
presentation on Dockerpresentation on Docker
presentation on Docker
 

Similar to .NET Core, ASP.NET Core Course, Session 1

Introduction to dot net
Introduction to dot netIntroduction to dot net
Introduction to dot net
QIANG XU
 
Dive into .Net Core framework
Dive into .Net Core framework Dive into .Net Core framework
Dive into .Net Core framework
ElifTech
 
.Net Core Blimey! (16/07/2015)
.Net Core Blimey! (16/07/2015).Net Core Blimey! (16/07/2015)
.Net Core Blimey! (16/07/2015)
citizenmatt
 
1..Net Framework Architecture-(c#)
1..Net Framework Architecture-(c#)1..Net Framework Architecture-(c#)
1..Net Framework Architecture-(c#)
Shoaib Ghachi
 
.net Core Blimey - Smart Devs UG
.net Core Blimey - Smart Devs UG.net Core Blimey - Smart Devs UG
.net Core Blimey - Smart Devs UG
citizenmatt
 
ASP.NET Core: The best of the new bits
ASP.NET Core: The best of the new bitsASP.NET Core: The best of the new bits
ASP.NET Core: The best of the new bits
Ken Cenerelli
 
.NET Core Blimey! (dotnetsheff Jan 2016)
.NET Core Blimey! (dotnetsheff Jan 2016).NET Core Blimey! (dotnetsheff Jan 2016)
.NET Core Blimey! (dotnetsheff Jan 2016)
citizenmatt
 
Asp.Net Core MVC , Razor page , Entity Framework Core
Asp.Net Core MVC , Razor page , Entity Framework CoreAsp.Net Core MVC , Razor page , Entity Framework Core
Asp.Net Core MVC , Razor page , Entity Framework Core
mohamed elshafey
 
Future of .NET - .NET on Non Windows Platforms
Future of .NET - .NET on Non Windows PlatformsFuture of .NET - .NET on Non Windows Platforms
Future of .NET - .NET on Non Windows Platforms
Aniruddha Chakrabarti
 
Raffaele Rialdi
Raffaele RialdiRaffaele Rialdi
Raffaele Rialdi
CodeFest
 
.NET Core Blimey! (Shropshire Devs Mar 2016)
.NET Core Blimey! (Shropshire Devs Mar 2016).NET Core Blimey! (Shropshire Devs Mar 2016)
.NET Core Blimey! (Shropshire Devs Mar 2016)
citizenmatt
 
.NET Core Blimey! Windows Platform User Group, Manchester
.NET Core Blimey! Windows Platform User Group, Manchester.NET Core Blimey! Windows Platform User Group, Manchester
.NET Core Blimey! Windows Platform User Group, Manchester
citizenmatt
 
Modified.net overview
Modified.net overviewModified.net overview
Modified.net overviewFaisal Aziz
 
Whats new in .net for 2019
Whats new in .net for 2019Whats new in .net for 2019
Whats new in .net for 2019
Rory Preddy
 
Pottnet Meetup Essen - ASP.Net Core
Pottnet Meetup Essen - ASP.Net CorePottnet Meetup Essen - ASP.Net Core
Pottnet Meetup Essen - ASP.Net Core
Malte Lantin
 
Pottnet MeetUp Essen - ASP.Net Core
Pottnet MeetUp Essen - ASP.Net CorePottnet MeetUp Essen - ASP.Net Core
Pottnet MeetUp Essen - ASP.Net Core
Malte Lantin
 
Difference between .net core and .net framework
Difference between .net core and .net frameworkDifference between .net core and .net framework
Difference between .net core and .net framework
Ansi Bytecode
 
.NET Core, ASP.NET Core Course, Session 3
.NET Core, ASP.NET Core Course, Session 3.NET Core, ASP.NET Core Course, Session 3
.NET Core, ASP.NET Core Course, Session 3
aminmesbahi
 

Similar to .NET Core, ASP.NET Core Course, Session 1 (20)

Introduction to dot net
Introduction to dot netIntroduction to dot net
Introduction to dot net
 
Dive into .Net Core framework
Dive into .Net Core framework Dive into .Net Core framework
Dive into .Net Core framework
 
.Net Core Blimey! (16/07/2015)
.Net Core Blimey! (16/07/2015).Net Core Blimey! (16/07/2015)
.Net Core Blimey! (16/07/2015)
 
1..Net Framework Architecture-(c#)
1..Net Framework Architecture-(c#)1..Net Framework Architecture-(c#)
1..Net Framework Architecture-(c#)
 
.net Core Blimey - Smart Devs UG
.net Core Blimey - Smart Devs UG.net Core Blimey - Smart Devs UG
.net Core Blimey - Smart Devs UG
 
ASP.NET Core: The best of the new bits
ASP.NET Core: The best of the new bitsASP.NET Core: The best of the new bits
ASP.NET Core: The best of the new bits
 
.NET Core Blimey! (dotnetsheff Jan 2016)
.NET Core Blimey! (dotnetsheff Jan 2016).NET Core Blimey! (dotnetsheff Jan 2016)
.NET Core Blimey! (dotnetsheff Jan 2016)
 
Asp.Net Core MVC , Razor page , Entity Framework Core
Asp.Net Core MVC , Razor page , Entity Framework CoreAsp.Net Core MVC , Razor page , Entity Framework Core
Asp.Net Core MVC , Razor page , Entity Framework Core
 
Lecture 10
Lecture 10Lecture 10
Lecture 10
 
Future of .NET - .NET on Non Windows Platforms
Future of .NET - .NET on Non Windows PlatformsFuture of .NET - .NET on Non Windows Platforms
Future of .NET - .NET on Non Windows Platforms
 
Raffaele Rialdi
Raffaele RialdiRaffaele Rialdi
Raffaele Rialdi
 
.NET Core Blimey! (Shropshire Devs Mar 2016)
.NET Core Blimey! (Shropshire Devs Mar 2016).NET Core Blimey! (Shropshire Devs Mar 2016)
.NET Core Blimey! (Shropshire Devs Mar 2016)
 
.NET Core Blimey! Windows Platform User Group, Manchester
.NET Core Blimey! Windows Platform User Group, Manchester.NET Core Blimey! Windows Platform User Group, Manchester
.NET Core Blimey! Windows Platform User Group, Manchester
 
Modified.net overview
Modified.net overviewModified.net overview
Modified.net overview
 
Whats new in .net for 2019
Whats new in .net for 2019Whats new in .net for 2019
Whats new in .net for 2019
 
Introduction to .NET Framework
Introduction to .NET FrameworkIntroduction to .NET Framework
Introduction to .NET Framework
 
Pottnet Meetup Essen - ASP.Net Core
Pottnet Meetup Essen - ASP.Net CorePottnet Meetup Essen - ASP.Net Core
Pottnet Meetup Essen - ASP.Net Core
 
Pottnet MeetUp Essen - ASP.Net Core
Pottnet MeetUp Essen - ASP.Net CorePottnet MeetUp Essen - ASP.Net Core
Pottnet MeetUp Essen - ASP.Net Core
 
Difference between .net core and .net framework
Difference between .net core and .net frameworkDifference between .net core and .net framework
Difference between .net core and .net framework
 
.NET Core, ASP.NET Core Course, Session 3
.NET Core, ASP.NET Core Course, Session 3.NET Core, ASP.NET Core Course, Session 3
.NET Core, ASP.NET Core Course, Session 3
 

More from aminmesbahi

How to choose appropriate technology for product development - Persian Version
How to choose appropriate technology for product development - Persian VersionHow to choose appropriate technology for product development - Persian Version
How to choose appropriate technology for product development - Persian Version
aminmesbahi
 
How to choose appropriate technology for product development
How to choose appropriate technology for product developmentHow to choose appropriate technology for product development
How to choose appropriate technology for product development
aminmesbahi
 
Python + Machine Learning Course, Session 2
Python + Machine Learning Course, Session 2Python + Machine Learning Course, Session 2
Python + Machine Learning Course, Session 2
aminmesbahi
 
Python + Machine Learning Course, Session 1
Python + Machine Learning Course, Session 1Python + Machine Learning Course, Session 1
Python + Machine Learning Course, Session 1
aminmesbahi
 
.NET Core, ASP.NET Core Course, Session 19
 .NET Core, ASP.NET Core Course, Session 19 .NET Core, ASP.NET Core Course, Session 19
.NET Core, ASP.NET Core Course, Session 19
aminmesbahi
 
.NET Core, ASP.NET Core Course, Session 18
 .NET Core, ASP.NET Core Course, Session 18 .NET Core, ASP.NET Core Course, Session 18
.NET Core, ASP.NET Core Course, Session 18
aminmesbahi
 
.NET Core, ASP.NET Core Course, Session 17
.NET Core, ASP.NET Core Course, Session 17.NET Core, ASP.NET Core Course, Session 17
.NET Core, ASP.NET Core Course, Session 17
aminmesbahi
 
.NET Core, ASP.NET Core Course, Session 16
.NET Core, ASP.NET Core Course, Session 16.NET Core, ASP.NET Core Course, Session 16
.NET Core, ASP.NET Core Course, Session 16
aminmesbahi
 
.NET Core, ASP.NET Core Course, Session 15
.NET Core, ASP.NET Core Course, Session 15.NET Core, ASP.NET Core Course, Session 15
.NET Core, ASP.NET Core Course, Session 15
aminmesbahi
 
.NET Core, ASP.NET Core Course, Session 14
.NET Core, ASP.NET Core Course, Session 14.NET Core, ASP.NET Core Course, Session 14
.NET Core, ASP.NET Core Course, Session 14
aminmesbahi
 
.NET Core, ASP.NET Core Course, Session 13
.NET Core, ASP.NET Core Course, Session 13.NET Core, ASP.NET Core Course, Session 13
.NET Core, ASP.NET Core Course, Session 13
aminmesbahi
 
.NET Core, ASP.NET Core Course, Session 12
.NET Core, ASP.NET Core Course, Session 12.NET Core, ASP.NET Core Course, Session 12
.NET Core, ASP.NET Core Course, Session 12
aminmesbahi
 
.NET Core, ASP.NET Core Course, Session 11
.NET Core, ASP.NET Core Course, Session 11.NET Core, ASP.NET Core Course, Session 11
.NET Core, ASP.NET Core Course, Session 11
aminmesbahi
 
.NET Core, ASP.NET Core Course, Session 10
.NET Core, ASP.NET Core Course, Session 10.NET Core, ASP.NET Core Course, Session 10
.NET Core, ASP.NET Core Course, Session 10
aminmesbahi
 
.NET Core, ASP.NET Core Course, Session 9
.NET Core, ASP.NET Core Course, Session 9.NET Core, ASP.NET Core Course, Session 9
.NET Core, ASP.NET Core Course, Session 9
aminmesbahi
 
.NET Core, ASP.NET Core Course, Session 8
.NET Core, ASP.NET Core Course, Session 8.NET Core, ASP.NET Core Course, Session 8
.NET Core, ASP.NET Core Course, Session 8
aminmesbahi
 
.NET Core, ASP.NET Core Course, Session 7
.NET Core, ASP.NET Core Course, Session 7.NET Core, ASP.NET Core Course, Session 7
.NET Core, ASP.NET Core Course, Session 7
aminmesbahi
 
.NET Core, ASP.NET Core Course, Session 5
.NET Core, ASP.NET Core Course, Session 5.NET Core, ASP.NET Core Course, Session 5
.NET Core, ASP.NET Core Course, Session 5
aminmesbahi
 
.NET Core, ASP.NET Core Course, Session 4
.NET Core, ASP.NET Core Course, Session 4.NET Core, ASP.NET Core Course, Session 4
.NET Core, ASP.NET Core Course, Session 4
aminmesbahi
 
.NET Core, ASP.NET Core Course, Session 2
.NET Core, ASP.NET Core Course, Session 2.NET Core, ASP.NET Core Course, Session 2
.NET Core, ASP.NET Core Course, Session 2
aminmesbahi
 

More from aminmesbahi (20)

How to choose appropriate technology for product development - Persian Version
How to choose appropriate technology for product development - Persian VersionHow to choose appropriate technology for product development - Persian Version
How to choose appropriate technology for product development - Persian Version
 
How to choose appropriate technology for product development
How to choose appropriate technology for product developmentHow to choose appropriate technology for product development
How to choose appropriate technology for product development
 
Python + Machine Learning Course, Session 2
Python + Machine Learning Course, Session 2Python + Machine Learning Course, Session 2
Python + Machine Learning Course, Session 2
 
Python + Machine Learning Course, Session 1
Python + Machine Learning Course, Session 1Python + Machine Learning Course, Session 1
Python + Machine Learning Course, Session 1
 
.NET Core, ASP.NET Core Course, Session 19
 .NET Core, ASP.NET Core Course, Session 19 .NET Core, ASP.NET Core Course, Session 19
.NET Core, ASP.NET Core Course, Session 19
 
.NET Core, ASP.NET Core Course, Session 18
 .NET Core, ASP.NET Core Course, Session 18 .NET Core, ASP.NET Core Course, Session 18
.NET Core, ASP.NET Core Course, Session 18
 
.NET Core, ASP.NET Core Course, Session 17
.NET Core, ASP.NET Core Course, Session 17.NET Core, ASP.NET Core Course, Session 17
.NET Core, ASP.NET Core Course, Session 17
 
.NET Core, ASP.NET Core Course, Session 16
.NET Core, ASP.NET Core Course, Session 16.NET Core, ASP.NET Core Course, Session 16
.NET Core, ASP.NET Core Course, Session 16
 
.NET Core, ASP.NET Core Course, Session 15
.NET Core, ASP.NET Core Course, Session 15.NET Core, ASP.NET Core Course, Session 15
.NET Core, ASP.NET Core Course, Session 15
 
.NET Core, ASP.NET Core Course, Session 14
.NET Core, ASP.NET Core Course, Session 14.NET Core, ASP.NET Core Course, Session 14
.NET Core, ASP.NET Core Course, Session 14
 
.NET Core, ASP.NET Core Course, Session 13
.NET Core, ASP.NET Core Course, Session 13.NET Core, ASP.NET Core Course, Session 13
.NET Core, ASP.NET Core Course, Session 13
 
.NET Core, ASP.NET Core Course, Session 12
.NET Core, ASP.NET Core Course, Session 12.NET Core, ASP.NET Core Course, Session 12
.NET Core, ASP.NET Core Course, Session 12
 
.NET Core, ASP.NET Core Course, Session 11
.NET Core, ASP.NET Core Course, Session 11.NET Core, ASP.NET Core Course, Session 11
.NET Core, ASP.NET Core Course, Session 11
 
.NET Core, ASP.NET Core Course, Session 10
.NET Core, ASP.NET Core Course, Session 10.NET Core, ASP.NET Core Course, Session 10
.NET Core, ASP.NET Core Course, Session 10
 
.NET Core, ASP.NET Core Course, Session 9
.NET Core, ASP.NET Core Course, Session 9.NET Core, ASP.NET Core Course, Session 9
.NET Core, ASP.NET Core Course, Session 9
 
.NET Core, ASP.NET Core Course, Session 8
.NET Core, ASP.NET Core Course, Session 8.NET Core, ASP.NET Core Course, Session 8
.NET Core, ASP.NET Core Course, Session 8
 
.NET Core, ASP.NET Core Course, Session 7
.NET Core, ASP.NET Core Course, Session 7.NET Core, ASP.NET Core Course, Session 7
.NET Core, ASP.NET Core Course, Session 7
 
.NET Core, ASP.NET Core Course, Session 5
.NET Core, ASP.NET Core Course, Session 5.NET Core, ASP.NET Core Course, Session 5
.NET Core, ASP.NET Core Course, Session 5
 
.NET Core, ASP.NET Core Course, Session 4
.NET Core, ASP.NET Core Course, Session 4.NET Core, ASP.NET Core Course, Session 4
.NET Core, ASP.NET Core Course, Session 4
 
.NET Core, ASP.NET Core Course, Session 2
.NET Core, ASP.NET Core Course, Session 2.NET Core, ASP.NET Core Course, Session 2
.NET Core, ASP.NET Core Course, Session 2
 

Recently uploaded

Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
Srikant77
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 

Recently uploaded (20)

Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 

.NET Core, ASP.NET Core Course, Session 1

  • 1. .NET Core + ASP.NET Core Training Course Session 1
  • 2. .NET Core History Of .NET History
  • 5. .NET Core TIOBE Index for June 2016 Why .NET?
  • 7. .NET Core About What is the .NET Core Platform? • .NET Core is a cross-platform implementation of .NET Framework • Main Goal: modular, performant and cross-platform execution environment for modern applications • .NET Core is a subset of the .NET Framework • It’s primarily being driven by ASP.NET Core workloads • .NET Core consists of the CoreCLR runtime and the CoreFX framework libraries • A set of cross-platform tooling can be found in the .NET CLI • The Roslyn compiler and LLILC compiler are sibling projects that support .NET Core
  • 8. .NET Core .NET Core is… What is the .NET Core Platform? 32-bit and 64-bit Windows platforms, as well as on mac OS and Linux manages memory with a garbage collector, compiles your code with a JIT compiler or ahead of time with .NET Native. .NET Core is a set of runtime, library and compiler components. Generics, Language Integrated Query (LINQ), Async support, "Roslyn" Managed compiler usable as a service Streamlined and easy interoperability with native code
  • 9. .NET Core .NET Core is… What is the .NET Core Platform? Runtime modularity allows for an extensibility model, and componentization strategies with package manager NuGet client applications, across web, server workloads to mobile apps Platforms: OS and Processor Architectures | Application Stacks: Mono Open ECMA standard, both its runtime and its class libraries
  • 10. .NET Core Console Application: .NET Core Application Types: Console Application • Cross-platform: Console apps can run on Windows, OS X, and Linux. • Native compilation: This combines the benefits of a managed app with the performance of a native C/C++ app.
  • 11. .NET Core Features .NET Core Features • Ease of Installation • Because .NET Core is not an operating system component, installation: • Does not require administrator privileges. • Does not touch system components like operating system directories or, on Windows systems, the Windows Registry. • Is as simple as copying some files to a directory on the target computer or compiling the framework natively into the app.
  • 12. .NET Core .NET Core has two deployment models: .NET Core Deployment models: Portable Apps • Portable Apps • You will deploy only your app and any of its dependencies other than the .NET Core libraries • A portable app requires that .NET Core is installed on the target machine in order for it to run • .NET Core is an independent component so you do not need to determine in advance which platforms your app supports • Portable apps are the default app type in .NET Core
  • 13. .NET Core .NET Core has two deployment models: .NET Core Deployment models: Self-contained Apps • Self-contained Apps • include all of their dependencies, including the .NET Core runtime, as part of the app • .NET Core is local to your app so it can run on any supported platform whether .NET Core is installed on it or not • .NET libraries that your app uses are isolated from .NET Core libraries used by other apps • Requires that you determine the target platforms that your app supports in advance
  • 14. .NET Core .NET Core Components .NET Core Components • Common Language Runtime: which in .NET Core is named CoreCLR • CoreFX: a modular collection of libraries • allows you to include the libraries that your app needs without the overhead of including those that you don't need
  • 15. .NET Core The Common Language Runtime .NET Core Components: CLR CoreCLR, or the common language runtime found in .NET Core, is a lightweight runtime that offers many of the same services as the .NET Framework's common language runtime on the Windows desktop. These include: • Garbage Collector • provides automatic memory management • Allocates and frees memory as needed; you do not have to do it programmatically • .NET Core uses the same garbage collector as the .NET Framework • Just-in-time (JIT) compiler • compiles IL, or .NET intermediate language, to native machine code at runtime. • On some architectures, the JIT compiler includes support for SIMD hardware acceleration • An exception handling mechanism • allows you to handle exceptions with try/catch statements
  • 16. .NET Core The Class Library .NET Core Components: The Class Library Is very much like the .NET Framework Class Library for the Windows desktop. With one major difference: On the Windows desktop, it is a monolithic library that is part of the operating system and is maintained by Windows Update. On .NET Core it is a modular and factored collection of individual libraries organized by functionality Microsoft.NetCore.App is included with the runtime and contains the basic types needed for all app development. Some of these include: • Primitives, such as the Boolean type, signed and unsigned integral types, floating-point types, and the Char structure. • The String type, UTF-16 code units. .NET Core also includes a number of encoding types that let you convert UTF-16 encoded strings to an array of bytes in other encodings. For example, you can use the UTF8Encoding class to convert a .NET Core string to a UTF-8 encoded byte array that represents a string on Linux.
  • 17. .NET Core The Class Library .NET Core Components: The Class Library • General-purpose exception classes, such as the ArgumentException, ArgumentNullException, and NullReferenceException types. • The task types, such as Task and Task<T>, to support asynchronous programming. • Basic threading types • The Console class, to support the development of console apps. • Other libraries are installed as NuGet packages
  • 18. .NET Core dotnet.exe .NET Core Tools: CLI • dotnet --help : Displays information about .NET Core CLI commands • dotnet new : Initializes a new C# project • dotnet new --lang F# : Initializes a new F# project. • dotnet restore : Restores the dependencies for an app. • dotnet build : Builds a .NET Core app. • dotnet publish : Publishes a .NET portable or self-contained app. (See the "Ease of Deployment" section below. • dotnet run : Runs the app from its source code. • dotnet pack : Creates a NuGet package of your code. dotnet.exe also has an extensibility model that lets you add additional commands.
  • 19. .NET Core Language Support and Development Environments .NET Core Tools: Language Support and Development Environments • Any programming language that targets .NET Core can be used to develop .NET Core app • An app that targets .NET Core and is written in one programming language can seamlessly access types and members in .NET Core libraries that were developed by using a different programming language • You can currently develop .NET Core apps in either of two languages: • C#, which is based on the .NET Compiler Platform, also known as Roslyn. • F#. • Additional languages are planned for the future • Development Environments: Notepad, Visual Studio Code, Visual Studio 2015 Update 2 (and higher)
  • 20. .NET Core .NET Core vs .NET Framework 4.x .NET Core vs .NET Framework 4.x .NET Core Includes CoreCLR, a more lightweight runtime that provides basic services: automatic memory management and garbage collection, along with a basic type library. Includes CoreFx, a set of individual modular assemblies that you can add to your app as needed. Unlike the .NET Framework 4.x you can select only the assemblies that you need, suitable for a full range of modern apps, including apps that operate on small devices with constrained memory and storage. Can be used to develop apps that take advantage of a number of technologies, such as ASP .NET Core, WCF, WF Can be app local. That is, the .NET Core implementation that your app relies is tightly bound to your app. This mitigates versioning problems. vs .NET Framework 4.x Includes CLR, a sizeable runtime that provides memory management, isolation by application domain, and a host of other application services. Includes the .NET Framework Class Library, a large, monolithic library with thousands of classes and many thousands of members. they are always present and accessible. Is suitable for developing traditional Windows desktop apps, including Windows Forms (WinForms) and Windows Presentation Foundation (WPF) apps. ASP.NET and ASP.NET Web Forms, Windows Communication Foundation (WCF), Workflow Foundation (WF Is globally available on a given system. An app can include a chain installer that installs a particular version of the .NET, this can create versioning problems. Starting with Windows 8, a version of the .NET Framework is installed as an operating system component and is serviced by Windows Update.
  • 21. .NET Core .NET Standard .NET Standard .NET Framework 4.6.2 Preview and .NET Core both conform to the .NET Standard 1.5. They target different platforms and represent different approaches to app development and deployment • Experienced .NET Framework developers can easily adapt to developing with .NET Core when whey want to target different platforms and devices. • .NET Core developers can easily transition to developing apps with the .NET Framework that target Windows desktop, tablet, and phone. • Libraries written for the .NET Framework or .NET Core can easily be made to work on the other platform.
  • 22. .NET Core .NET Core implementations .NET Core implementations • ASP.NET Core • . ASP.NET Core is a modular version of ASP.NET that combines ASP.NET MVC and the ASP.NET Web API. • It runs on both the .NET Framework and .NET Core and is designed for building high-performance cloud and microservice apps • It is not intended as a replacement to ASP.NET in the .NET Framework. • .NET Native. • .NET Native is a compilation and deployment technology for Universal Windows Platform (UWP) apps written in C# and Visual Basic. • .NET Native compiles apps to native code, and statically links into an application's assemblies only those code elements from .NET Core libraries and other third-party libraries that are actually used.
  • 23. .NET Core .NET Core implementations .NET Core implementations • Universal Windows Platform (UWP) apps. • The UWP allows you to build a single app that can run on the Windows desktop, Windows tablet devices, and Windows Phone. • These apps can also be placed in the Windows Store. • UWP apps are compiled to native code for their target platforms by .NET Native.
  • 24. .NET Core .NET Core System Requirements Installing .NET Core: System Requirements • Windows client supported in both 32-bit and 64-bit editions • Windows 7 SP1, Windows 8.1, Windows 10 • Windows Server 2008 R2 SP1, 2012 SP1, 2012 R2 SP1 (Full Server or Server Core) • Windows Server 2016 (Full Server, Server Core or Nano Server) • Linux • CentOS 7.1, Debian 8.2, Red Hat Enterprise Linux 7.2, Ubuntu 14.04 LTS • OS X • OS X 10.11 (El Capitan) and above
  • 25. .NET Core .NET Core Software Development Kit (SDK) Overview Installing .NET Core: .NET Core Software Development Kit (SDK) Overview .NET Core Software Development Kit is a set of libraries and tools that allow developers to create .NET Core applications and libraries. It contains the following components: • The .NET Core Command Line Tools that are used to build applications • .NET Core (libraries and runtime) that allow applications to both be built and run • The dotnet driver for running the CLI commands as well as running applications
  • 26. .NET Core Acquiring the .NET Core SDK Installing .NET Core: .NET Core Software Development Kit (SDK) Overview • The native installers are primarily meant for developer's machines. DEB packages on Ubuntu or MSI bundles on Windows. These installers will install and set up the environment as needed for the user to use the SDK immediately after the install and they require administrative privileges on the machine. • Install scripts, do not require administrative privileges. They will also not install any prerequisites on the machine; you need to install all of the pre-requisites manually. The scripts are meant mostly for setting up build servers or when you wish to install the tools without admin privileges. By default, the SDK will install in a "side-by-side" (SxS) manner means that multiple versions of the CLI tools can coexist at any given time on a single machine.
  • 28. .NET Core Step by Step Hello World with .NET Core .NET Core: Hello World  $ dotnet new dotnet new creates an up-to-date project.json file with NuGet dependencies necessary to build a console app. It also creates a Program.cs, a basic file containing the entry point for the application.
  • 30. .NET Core $ dotnet restore .NET Core: Hello World  dotnet restore calls into NuGet to restore the tree of dependencies. NuGet analyzes the project.json file, downloads the dependencies stated in the file (or grabs them from a cache on your machine), and writes the project.lock.json file. The project.lock.json file is necessary to be able to compile and run. The project.lock.json file is a persisted and complete set of the graph of NuGet dependencies and other information describing an app. This file is read by other tools, such as dotnet build and dotnet run, enabling them to process the source code with a correct set of NuGet dependencies and binding resolutions.
  • 31. .NET Core $ dotnet run .NET Core: Hello World  dotnet run calls dotnet build to ensure that the build targets have been built, and then calls dotnet <assembly.dll> to run the target application. You can also execute dotnet build to compile and the code without running the build console applications.
  • 32. .NET Core Building a self-contained application .NET Core: Hello World  Change the project.json file to direct the tools to build a self-contained application. The first change is to remove the "type": "platform" element from all dependencies. This project's only dependency so far is "Microsoft.NETCore.App". The dependencies section should look like this:
  • 33. .NET Core Building a self-contained application .NET Core: Hello World  Change the project.json file to direct the tools to build a self-contained application. The first change is to remove the "type": "platform" element from all dependencies. This project's only dependency so far is "Microsoft.NETCore.App". The dependencies section should look like this: Next, you need to add a runtimes node to specify all the target execution environments. The build system will generate native executables for the current environment. After making those two changes, execute dotnet restore, followed by dotnet build to create the native executable. RID Catalog
  • 34. .NET Core Building a self-contained application .NET Core: Hello World  Notice that the native application takes slightly longer to build, but executes slightly faster. This behavior becomes more noticeable as the application grows. The build process generates several more files when your project.json creates a native build. These files are created in binDebugnetcoreapp1.0<platform> where <platform> is the RID chosen. In addition to the project's HelloNative.dll there is a HelloNative.exe that loads the runtime and starts the application
  • 35. .NET Core Executing on a machine that does not include the .NET runtime .NET Core: Hello World  Use the dotnet publish command to create a new subdirectory under the ./bin/Debug/netcoreapp1.0/<platform> directory called publish. It copies the executable, all dependent DLLs and the framework to this sub directory package that directory to another machine (or a container) and execute the application there. That application is a portable application which is the default type of application for .NET Core and requires that .NET Core is installed on the target machine. Portable applications can be built on one machine and executed anywhere. Native applications must be built separately for each target machine. dotnet publish creates a directory that has the application's DLL, and any dependent dlls that are not part of the platform installation.
  • 36. .NET Core Samples .NET Core: Hello World  1. Hello 2. HelloNative 3. Fibonacci 4. FibonacciBetter 5. NewTypes