SlideShare a Scribd company logo
Introduction to .NET Core with
Visual Studio 2017
Raffaele Rialdi Senior Software Architect
Vevy Europe
@raffaeler
raffaeler@vevy.com
Who am I?
• I am Raffaele Rialdi, Senior Software Architect in Vevy Europe – Italy
• I am also consultant in many industries (manufacturing, racing, healthcare, financial, …)
• But also Speaker in italian and international conferences, and Trainer as well
• And very proud to have been awarded as a Microsoft MVP since 2003
@raffaeler
raffaeler@vevy.com
github.com/raffaeler
.NET Framework (version 1.0 - 4.62)
• 15 years, 1.8 billion
installations
• Multiple codebases
• Desktop, Silverlight
• x86 - Windows
• Compact Framework
• ARM – Windows CE
• Micro Framework
• ARM
• Non-Microsoft .NET
• Mono / Xamarin
• Linux, iOS, MacOS, …
• x86 and ARM
.NET Framework
Common Language Specification
VB C++ C# F# …
Common Language Runtime (CLR)
Base Class Library (BCL)
Ado.net Asp.net Winform WPF ...
Multiple BCL codebases
.NET
Mono
&
Unity
Compact
Framewor
k Micro
Framewor
k
Silverlig
ht
..
.
The number of APIs is not proportional to the bars
What is NET Core?
• Technically a «fork» of the .NET Framework
• New runtime (Common Language Runtime – CLR)
• New libraries (Base Class Library – BCL)
• Changes to make the Cross Platform story work
• Scenarios taking advantage from Net Core (currently) are:
• ASP.NET Core: new ASP.NET stack, re-written from scratch
• Containerized applications / docker - ready
• Cloud Applications: Applications and Microservices running on Azure
• Universal Windows Platform: Windows Store Apps (cross-device)
• Console Application: the best way to start testing Net Core
Cross-Platform = No first-class Operating System
• Official daily compilations on GitHub include many OSes
• CentOS, Debian, FreeBSD, openSUSE, RedHat, Linux Mint, Ubuntu 14.04 to
16.10, Alpine Linux, …
• OSX 10.11
• Windows
Occasionally this may happen :)
The Big Picture
• Libraries using just CoreFX can be shared across all the Application Models
• Runtime Adaptation Layers are specific to a given Platform / CPU
• x86, x64, ARM, ...
(more CPUs are coming in town)
• Modular design for future extensions
• New Application Models
• New Operating Systems / Platforms
• New CLR variants
Runtime Adaption
Level
CoreCLR .NET Native …
.NET Standard Library
Runtime Adaption
Level
…
…
ASP.NET
WPF
Win
Forms
ASP.NET
CORE
UWP OS X
iOS Android
.NET Framework
"Classic"
.NET CORE Xamarin / Mono
CoreFX
The unified Command Line called "dotnet"
• The CLI (Command Line Interface) is back
• In the cross-platform world is the common denominator
• Nanoservers, IoT devices, etc. are controlled using the command line
• Deploy tasks can be automated
• Easy to install on a fresh machine
• Visual Studio will provide the UI for all the CLI commands
• Support "extensions" to add commands
• downloaded via dotnet restore
Hands on the DotNet CLI
1. Install the CLI
2. Create an App
3. Write some code
4. Restore packages
5. Run the app
mkdir myapp
cd myapp
dotnet new
dotnet restore
http://dot.net/
http://dot.net/
Commands:
new Initialize .NET projects.
restore Restore dependencies specified in the .NET project.
build Builds a .NET project.
publish Publishes a .NET project for deployment (including the runtime).
run Compiles and immediately executes a .NET project.
test Runs unit tests using the test runner specified in the project.
pack Creates a NuGet package.
migrate Migrates a project.json based project to a msbuild based
project.
clean Clean build output(s).
sln Modify solution (SLN) files.
Project modification commands:
add Add items to the project
remove Remove items from the project
list List items in the project
Advanced Commands:
nuget Provides additional NuGet commands.
msbuild Runs Microsoft Build Engine (MSBuild).
vstest Runs Microsoft Test Execution Command Line Tool.
dotnet run
...
https://github.com/dotnet/cli
Netstandard
• A library specification defining a set of APIs with no implementation
• Think to netstandard as it was a huge interface
• All NET Frameworks must implement all those APIs
• CoreFX is a superset of netstandard
• https://github.com/dotnet/corefx
• The review board defines the number of netstandard APIs
• No platform specific APIs but abstractions to access to the OS services
• Only APIs that should be always available
• Netstandard avoid the confusion of external libraries
• NodeJS suffers from this problem
https://github.com/dotnet/standard/
NetStandard versions vs Platforms
Framework TFM
.NET Standard netstandard 1.0 1.1 1.2 1.3 1.4 1.5 1.6 2.0
.NET Core netcoreapp 1.0 2.0
.NET Framework net 4.5 4.5.1 4.6 4.6.1 4.6.2 vNext 4.6.1
Mono / Xamarin - vNext
UWP uap vNext
Windows win 8.0 8.1
Windows Phone wpa 8.1
Silverlight wp 8.0
(obsolete frameworks)
more APIs
more Frameworks
Unity Game Framework is going to support netstandard 2.0
Version # of APIs
netstandard 1.6 13,501
netstandard 2.0 32,638
API Cross-Reference
• A cross-reference with all .NET APIs
• Availability of every APIs in the .NET Framework, Mono, Net Core, …
• Answers to the question: which framework does support this API?
http://apisof.net
Packages
• Nuget is the package manager in the .net environment
• There is a 1:1:1 relationship among namespace, dll and package
• System.Reflection => System.Reflection.dll => Sytem.Reflection.nupkg
• Every package may be released "out of band"
• No more waiting for the next «.Net Framework Runtime»
• A Metapackage is a 'fake' package redirecting to several real
packages
• It does not contain dlls but just references to other packages
Metapackages
• Metapackages makes developer's life easier
• They are predefined sets of commonly used packages
• The NETStandard.Library Metapackage
• It references the libraries that are part of the ".NET Standard Library"
• The Microsoft.NETCore.App Metapackage
• It references the libraries that are part of the .NET Core distribution
• It is a larger set than NETStandard.Library
• The Microsoft.NETCore.Portable.Compatibility Metapackage
• The compatibility façades enabling PCLs based on mscorlib to run on
NetCore
How Projects specify the framework
• A NetCore app / library
• targets
• references Microsoft.NETCore.App
• A Netstandard library targets
• targets
• references NETStandard.Library
• Future 2.0 netcore apps
• targets
• To run on a specific framework version (this may change in the future)
<TargetFramework>netcoreapp1.1</TargetFramework>
<TargetFramework>netstandard1.4</TargetFramework>
<TargetFramework>netcoreapp2.0</TargetFramework>
<RuntimeFrameworkVersion>2.0.0-beta-25108-01</RuntimeFrameworkVersion>
 Never reference these metapackages in the nuget references
Self-Contained Depolyment (SCD)
• Visual Studio 2017 has a "Publish" menu in the solution explorer
• Using the CLI:
• The RIDs (Runtime Identifiers) must be specified in the csproj
• The nuget package
Microsoft.NETCore.Platforms
contains the all the
available RIDs
<RuntimeIdentifiers>win8-arm;ubuntu.14.04-arm;ubuntu.16.04-arm</RuntimeIdentifiers>
dotnet publish –r ubuntu.14.04-arm –o folder –c Release
Reducing the footprint of the SCD
• Replace netcoreapp1.1 with netstandard1.6
• Explicitly reference these base packages
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.Runtime.CoreCLR" Version="1.0.2" />
<PackageReference Include="Microsoft.NETCore.DotNetHostPolicy" Version="1.0.1" />
</ItemGroup>
<TargetFramework>netstandard1.6</TargetFramework>
Standard templates Console WebApp
Default win10-x64 45.6 MB 55.5 MB
Default ubuntu.16.04-x64 52.6 MB 62.6 MB
Reduced win10-x64 28.5 MB 47.4 MB
Reduced ubuntu.16.04-x64 36.8 MB 55.9 MB
Why adopting Net Core?
• It's fast!
• https://github.com/aspnet/benchmarks
• It small and ready for container and microsevices!
• Docker on x86-x64 is already available!
• With 2.0 we will have Docker on ARM devices
• It's the familiar .NET you already know!
• Netstandard libraries can be used across all the frameworks
• The upcoming 2.0 version will provide a shim for cross-framework calls
What's next?
• ARM support is coming with netcore 2.0 and netstandard 2.0
• Come to the Exhibition Zone to see a demo with a Raspberry PI!
• Interoperability with Node.JS
• Come to my session tomorrow, April 2nd, 1.30 - 2.10pm
• Use your C# libraries from Node.JS
@raffaeler
Questions?
www.iamraf.net
raffaeler@vevy.com
Raffaele Rialdi

More Related Content

What's hot

.Net Core 1.0 vs .NET Framework
.Net Core 1.0 vs .NET Framework.Net Core 1.0 vs .NET Framework
.Net Core 1.0 vs .NET Framework
Wyn B. Van Devanter
 
(DEV302) Hosting ASP.Net 5 Apps in AWS with Docker & AWS CodeDeploy
(DEV302) Hosting ASP.Net 5 Apps in AWS with Docker & AWS CodeDeploy(DEV302) Hosting ASP.Net 5 Apps in AWS with Docker & AWS CodeDeploy
(DEV302) Hosting ASP.Net 5 Apps in AWS with Docker & AWS CodeDeploy
Amazon Web Services
 
CollabSphere 2020 - NSF ODP Tooling
CollabSphere 2020 - NSF ODP ToolingCollabSphere 2020 - NSF ODP Tooling
CollabSphere 2020 - NSF ODP Tooling
Jesse Gallagher
 
Continuous Delivery and Infrastructure as Code
Continuous Delivery and Infrastructure as CodeContinuous Delivery and Infrastructure as Code
Continuous Delivery and Infrastructure as Code
Sascha Möllering
 
Introduction to .NET Core & ASP.NET Core MVC
Introduction to .NET Core & ASP.NET Core MVCIntroduction to .NET Core & ASP.NET Core MVC
Introduction to .NET Core & ASP.NET Core MVC
Saineshwar bageri
 
Rene Groeschke
Rene GroeschkeRene Groeschke
Rene Groeschke
CodeFest
 
Ceylon From Here to Infinity: The Big Picture and What's Coming
Ceylon From Here to Infinity: The Big Picture and What's Coming Ceylon From Here to Infinity: The Big Picture and What's Coming
Ceylon From Here to Infinity: The Big Picture and What's Coming
Virtual JBoss User Group
 
CollabSphere 2018 - Java in Domino After XPages
CollabSphere 2018 - Java in Domino After XPagesCollabSphere 2018 - Java in Domino After XPages
CollabSphere 2018 - Java in Domino After XPages
Jesse Gallagher
 
.Net Core
.Net Core.Net Core
.Net Core
Bertrand Le Roy
 
Immutable Infrastructure: the new App Deployment
Immutable Infrastructure: the new App DeploymentImmutable Infrastructure: the new App Deployment
Immutable Infrastructure: the new App Deployment
Axel Fontaine
 
Implementing your own Google App Engine
Implementing your own Google App Engine Implementing your own Google App Engine
Implementing your own Google App Engine
Virtual JBoss User Group
 
.NET Day Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥
.NET Day Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥.NET Day Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥
.NET Day Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥
Marc Müller
 
Fullstack DDD with ASP.NET Core and Anguar 2 - Ronald Harmsen, NForza
Fullstack DDD with ASP.NET Core and Anguar 2 - Ronald Harmsen, NForzaFullstack DDD with ASP.NET Core and Anguar 2 - Ronald Harmsen, NForza
Fullstack DDD with ASP.NET Core and Anguar 2 - Ronald Harmsen, NForza
Codemotion Tel Aviv
 
Dev112 let's calendar that
Dev112   let's calendar thatDev112   let's calendar that
Dev112 let's calendar that
Howard Greenberg
 
Conquering AngularJS Limitations
Conquering AngularJS LimitationsConquering AngularJS Limitations
Conquering AngularJS Limitations
Valeri Karpov
 
Ansible Introduction
Ansible Introduction Ansible Introduction
Ansible Introduction
Robert Reiz
 
Play Framework: Intro & High-Level Overview
Play Framework: Intro & High-Level OverviewPlay Framework: Intro & High-Level Overview
Play Framework: Intro & High-Level Overview
Josh Padnick
 
Zero Code Multi-Cloud Automation with Ansible and Terraform
Zero Code Multi-Cloud Automation with Ansible and TerraformZero Code Multi-Cloud Automation with Ansible and Terraform
Zero Code Multi-Cloud Automation with Ansible and Terraform
Avi Networks
 
Short-Training asp.net vNext
Short-Training asp.net vNextShort-Training asp.net vNext
Short-Training asp.net vNext
Betclic Everest Group Tech Team
 
Learning chef
Learning chefLearning chef
Learning chef
Jonathan Carrillo
 

What's hot (20)

.Net Core 1.0 vs .NET Framework
.Net Core 1.0 vs .NET Framework.Net Core 1.0 vs .NET Framework
.Net Core 1.0 vs .NET Framework
 
(DEV302) Hosting ASP.Net 5 Apps in AWS with Docker & AWS CodeDeploy
(DEV302) Hosting ASP.Net 5 Apps in AWS with Docker & AWS CodeDeploy(DEV302) Hosting ASP.Net 5 Apps in AWS with Docker & AWS CodeDeploy
(DEV302) Hosting ASP.Net 5 Apps in AWS with Docker & AWS CodeDeploy
 
CollabSphere 2020 - NSF ODP Tooling
CollabSphere 2020 - NSF ODP ToolingCollabSphere 2020 - NSF ODP Tooling
CollabSphere 2020 - NSF ODP Tooling
 
Continuous Delivery and Infrastructure as Code
Continuous Delivery and Infrastructure as CodeContinuous Delivery and Infrastructure as Code
Continuous Delivery and Infrastructure as Code
 
Introduction to .NET Core & ASP.NET Core MVC
Introduction to .NET Core & ASP.NET Core MVCIntroduction to .NET Core & ASP.NET Core MVC
Introduction to .NET Core & ASP.NET Core MVC
 
Rene Groeschke
Rene GroeschkeRene Groeschke
Rene Groeschke
 
Ceylon From Here to Infinity: The Big Picture and What's Coming
Ceylon From Here to Infinity: The Big Picture and What's Coming Ceylon From Here to Infinity: The Big Picture and What's Coming
Ceylon From Here to Infinity: The Big Picture and What's Coming
 
CollabSphere 2018 - Java in Domino After XPages
CollabSphere 2018 - Java in Domino After XPagesCollabSphere 2018 - Java in Domino After XPages
CollabSphere 2018 - Java in Domino After XPages
 
.Net Core
.Net Core.Net Core
.Net Core
 
Immutable Infrastructure: the new App Deployment
Immutable Infrastructure: the new App DeploymentImmutable Infrastructure: the new App Deployment
Immutable Infrastructure: the new App Deployment
 
Implementing your own Google App Engine
Implementing your own Google App Engine Implementing your own Google App Engine
Implementing your own Google App Engine
 
.NET Day Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥
.NET Day Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥.NET Day Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥
.NET Day Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥
 
Fullstack DDD with ASP.NET Core and Anguar 2 - Ronald Harmsen, NForza
Fullstack DDD with ASP.NET Core and Anguar 2 - Ronald Harmsen, NForzaFullstack DDD with ASP.NET Core and Anguar 2 - Ronald Harmsen, NForza
Fullstack DDD with ASP.NET Core and Anguar 2 - Ronald Harmsen, NForza
 
Dev112 let's calendar that
Dev112   let's calendar thatDev112   let's calendar that
Dev112 let's calendar that
 
Conquering AngularJS Limitations
Conquering AngularJS LimitationsConquering AngularJS Limitations
Conquering AngularJS Limitations
 
Ansible Introduction
Ansible Introduction Ansible Introduction
Ansible Introduction
 
Play Framework: Intro & High-Level Overview
Play Framework: Intro & High-Level OverviewPlay Framework: Intro & High-Level Overview
Play Framework: Intro & High-Level Overview
 
Zero Code Multi-Cloud Automation with Ansible and Terraform
Zero Code Multi-Cloud Automation with Ansible and TerraformZero Code Multi-Cloud Automation with Ansible and Terraform
Zero Code Multi-Cloud Automation with Ansible and Terraform
 
Short-Training asp.net vNext
Short-Training asp.net vNextShort-Training asp.net vNext
Short-Training asp.net vNext
 
Learning chef
Learning chefLearning chef
Learning chef
 

Similar to Raffaele Rialdi

.NET MeetUp Amsterdam 2017 - .NET Standard -- Karel Zikmund
.NET MeetUp Amsterdam 2017 - .NET Standard -- Karel Zikmund.NET MeetUp Amsterdam 2017 - .NET Standard -- Karel Zikmund
.NET MeetUp Amsterdam 2017 - .NET Standard -- Karel Zikmund
Karel Zikmund
 
.NET MeetUp Prague 2017 - .NET Standard -- Karel Zikmund
.NET MeetUp Prague 2017 - .NET Standard -- Karel Zikmund.NET MeetUp Prague 2017 - .NET Standard -- Karel Zikmund
.NET MeetUp Prague 2017 - .NET Standard -- Karel Zikmund
Karel Zikmund
 
Introduction to dot net
Introduction to dot netIntroduction to dot net
Introduction to dot net
QIANG XU
 
.Net Core
.Net Core.Net Core
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! (16/07/2015)
.Net Core Blimey! (16/07/2015).Net Core Blimey! (16/07/2015)
.Net Core Blimey! (16/07/2015)
citizenmatt
 
.Net platform .Net core fundamentals
.Net platform .Net core  fundamentals.Net platform .Net core  fundamentals
.Net platform .Net core fundamentals
Hosein Mansouri
 
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
 
.Net: Introduction, trends and future
.Net: Introduction, trends and future.Net: Introduction, trends and future
.Net: Introduction, trends and future
Bishnu Rawal
 
Overview of the new .NET Core and .NET Platform Standard
Overview of the new .NET Core and .NET Platform StandardOverview of the new .NET Core and .NET Platform Standard
Overview of the new .NET Core and .NET Platform Standard
Alex Thissen
 
ITCamp 2017 - Raffaele Rialdi - Adopting .NET Core in Mainstream Projects
ITCamp 2017 - Raffaele Rialdi - Adopting .NET Core in Mainstream ProjectsITCamp 2017 - Raffaele Rialdi - Adopting .NET Core in Mainstream Projects
ITCamp 2017 - Raffaele Rialdi - Adopting .NET Core in Mainstream Projects
ITCamp
 
.Net Standard 2.0
.Net Standard 2.0.Net Standard 2.0
.Net Standard 2.0
Swaminathan Vetri
 
ASP.NET 5 - Microsoft's Web development platform reimagined
ASP.NET 5 - Microsoft's Web development platform reimaginedASP.NET 5 - Microsoft's Web development platform reimagined
ASP.NET 5 - Microsoft's Web development platform reimagined
Alex Thissen
 
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! (dotnetsheff Jan 2016)
.NET Core Blimey! (dotnetsheff Jan 2016).NET Core Blimey! (dotnetsheff Jan 2016)
.NET Core Blimey! (dotnetsheff Jan 2016)
citizenmatt
 
.NET Core, ASP.NET Core Course, Session 1
.NET Core, ASP.NET Core Course, Session 1.NET Core, ASP.NET Core Course, Session 1
.NET Core, ASP.NET Core Course, Session 1
aminmesbahi
 
.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
 
.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
 
Dotnet on linux
Dotnet on linuxDotnet on linux
Dotnet on linux
Ebram Tharwat
 

Similar to Raffaele Rialdi (20)

.NET MeetUp Amsterdam 2017 - .NET Standard -- Karel Zikmund
.NET MeetUp Amsterdam 2017 - .NET Standard -- Karel Zikmund.NET MeetUp Amsterdam 2017 - .NET Standard -- Karel Zikmund
.NET MeetUp Amsterdam 2017 - .NET Standard -- Karel Zikmund
 
.NET MeetUp Prague 2017 - .NET Standard -- Karel Zikmund
.NET MeetUp Prague 2017 - .NET Standard -- Karel Zikmund.NET MeetUp Prague 2017 - .NET Standard -- Karel Zikmund
.NET MeetUp Prague 2017 - .NET Standard -- Karel Zikmund
 
Introduction to dot net
Introduction to dot netIntroduction to dot net
Introduction to dot net
 
.Net Core
.Net Core.Net Core
.Net Core
 
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! (16/07/2015)
.Net Core Blimey! (16/07/2015).Net Core Blimey! (16/07/2015)
.Net Core Blimey! (16/07/2015)
 
.Net platform .Net core fundamentals
.Net platform .Net core  fundamentals.Net platform .Net core  fundamentals
.Net platform .Net core fundamentals
 
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
 
.Net: Introduction, trends and future
.Net: Introduction, trends and future.Net: Introduction, trends and future
.Net: Introduction, trends and future
 
Overview of the new .NET Core and .NET Platform Standard
Overview of the new .NET Core and .NET Platform StandardOverview of the new .NET Core and .NET Platform Standard
Overview of the new .NET Core and .NET Platform Standard
 
ITCamp 2017 - Raffaele Rialdi - Adopting .NET Core in Mainstream Projects
ITCamp 2017 - Raffaele Rialdi - Adopting .NET Core in Mainstream ProjectsITCamp 2017 - Raffaele Rialdi - Adopting .NET Core in Mainstream Projects
ITCamp 2017 - Raffaele Rialdi - Adopting .NET Core in Mainstream Projects
 
.Net Standard 2.0
.Net Standard 2.0.Net Standard 2.0
.Net Standard 2.0
 
ASP.NET 5 - Microsoft's Web development platform reimagined
ASP.NET 5 - Microsoft's Web development platform reimaginedASP.NET 5 - Microsoft's Web development platform reimagined
ASP.NET 5 - Microsoft's Web development platform reimagined
 
1..Net Framework Architecture-(c#)
1..Net Framework Architecture-(c#)1..Net Framework Architecture-(c#)
1..Net Framework Architecture-(c#)
 
.NET Core Blimey! (dotnetsheff Jan 2016)
.NET Core Blimey! (dotnetsheff Jan 2016).NET Core Blimey! (dotnetsheff Jan 2016)
.NET Core Blimey! (dotnetsheff Jan 2016)
 
.NET Core, ASP.NET Core Course, Session 1
.NET Core, ASP.NET Core Course, Session 1.NET Core, ASP.NET Core Course, Session 1
.NET Core, ASP.NET Core Course, Session 1
 
.net Core Blimey - Smart Devs UG
.net Core Blimey - Smart Devs UG.net Core Blimey - Smart Devs UG
.net Core Blimey - Smart Devs UG
 
.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)
 
Dotnet on linux
Dotnet on linuxDotnet on linux
Dotnet on linux
 

More from CodeFest

Alexander Graebe
Alexander GraebeAlexander Graebe
Alexander Graebe
CodeFest
 
Никита Прокопов
Никита ПрокоповНикита Прокопов
Никита Прокопов
CodeFest
 
Денис Баталов
Денис БаталовДенис Баталов
Денис Баталов
CodeFest
 
Елена Гальцина
Елена ГальцинаЕлена Гальцина
Елена Гальцина
CodeFest
 
Александр Калашников
Александр КалашниковАлександр Калашников
Александр Калашников
CodeFest
 
Ирина Иванова
Ирина ИвановаИрина Иванова
Ирина Иванова
CodeFest
 
Marko Berković
Marko BerkovićMarko Berković
Marko Berković
CodeFest
 
Денис Кортунов
Денис КортуновДенис Кортунов
Денис Кортунов
CodeFest
 
Александр Зимин
Александр ЗиминАлександр Зимин
Александр Зимин
CodeFest
 
Сергей Крапивенский
Сергей КрапивенскийСергей Крапивенский
Сергей Крапивенский
CodeFest
 
Сергей Игнатов
Сергей ИгнатовСергей Игнатов
Сергей Игнатов
CodeFest
 
Николай Крапивный
Николай КрапивныйНиколай Крапивный
Николай Крапивный
CodeFest
 
Alexander Graebe
Alexander GraebeAlexander Graebe
Alexander Graebe
CodeFest
 
Вадим Смирнов
Вадим СмирновВадим Смирнов
Вадим Смирнов
CodeFest
 
Константин Осипов
Константин ОсиповКонстантин Осипов
Константин Осипов
CodeFest
 
Максим Пугачев
Максим ПугачевМаксим Пугачев
Максим Пугачев
CodeFest
 
Иван Бондаренко
Иван БондаренкоИван Бондаренко
Иван Бондаренко
CodeFest
 
Алексей Акулович
Алексей АкуловичАлексей Акулович
Алексей Акулович
CodeFest
 
Артем Титаренко
Артем ТитаренкоАртем Титаренко
Артем Титаренко
CodeFest
 
Олег Савкин
Олег СавкинОлег Савкин
Олег Савкин
CodeFest
 

More from CodeFest (20)

Alexander Graebe
Alexander GraebeAlexander Graebe
Alexander Graebe
 
Никита Прокопов
Никита ПрокоповНикита Прокопов
Никита Прокопов
 
Денис Баталов
Денис БаталовДенис Баталов
Денис Баталов
 
Елена Гальцина
Елена ГальцинаЕлена Гальцина
Елена Гальцина
 
Александр Калашников
Александр КалашниковАлександр Калашников
Александр Калашников
 
Ирина Иванова
Ирина ИвановаИрина Иванова
Ирина Иванова
 
Marko Berković
Marko BerkovićMarko Berković
Marko Berković
 
Денис Кортунов
Денис КортуновДенис Кортунов
Денис Кортунов
 
Александр Зимин
Александр ЗиминАлександр Зимин
Александр Зимин
 
Сергей Крапивенский
Сергей КрапивенскийСергей Крапивенский
Сергей Крапивенский
 
Сергей Игнатов
Сергей ИгнатовСергей Игнатов
Сергей Игнатов
 
Николай Крапивный
Николай КрапивныйНиколай Крапивный
Николай Крапивный
 
Alexander Graebe
Alexander GraebeAlexander Graebe
Alexander Graebe
 
Вадим Смирнов
Вадим СмирновВадим Смирнов
Вадим Смирнов
 
Константин Осипов
Константин ОсиповКонстантин Осипов
Константин Осипов
 
Максим Пугачев
Максим ПугачевМаксим Пугачев
Максим Пугачев
 
Иван Бондаренко
Иван БондаренкоИван Бондаренко
Иван Бондаренко
 
Алексей Акулович
Алексей АкуловичАлексей Акулович
Алексей Акулович
 
Артем Титаренко
Артем ТитаренкоАртем Титаренко
Артем Титаренко
 
Олег Савкин
Олег СавкинОлег Савкин
Олег Савкин
 

Recently uploaded

Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
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
 
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
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
Jelle | Nordend
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
KrzysztofKkol1
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Strategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptxStrategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptx
varshanayak241
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
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
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
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
 

Recently uploaded (20)

Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
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...
 
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
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Strategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptxStrategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptx
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
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
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
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
 

Raffaele Rialdi

  • 1. Introduction to .NET Core with Visual Studio 2017 Raffaele Rialdi Senior Software Architect Vevy Europe @raffaeler raffaeler@vevy.com
  • 2. Who am I? • I am Raffaele Rialdi, Senior Software Architect in Vevy Europe – Italy • I am also consultant in many industries (manufacturing, racing, healthcare, financial, …) • But also Speaker in italian and international conferences, and Trainer as well • And very proud to have been awarded as a Microsoft MVP since 2003 @raffaeler raffaeler@vevy.com github.com/raffaeler
  • 3. .NET Framework (version 1.0 - 4.62) • 15 years, 1.8 billion installations • Multiple codebases • Desktop, Silverlight • x86 - Windows • Compact Framework • ARM – Windows CE • Micro Framework • ARM • Non-Microsoft .NET • Mono / Xamarin • Linux, iOS, MacOS, … • x86 and ARM .NET Framework Common Language Specification VB C++ C# F# … Common Language Runtime (CLR) Base Class Library (BCL) Ado.net Asp.net Winform WPF ... Multiple BCL codebases .NET Mono & Unity Compact Framewor k Micro Framewor k Silverlig ht .. . The number of APIs is not proportional to the bars
  • 4. What is NET Core? • Technically a «fork» of the .NET Framework • New runtime (Common Language Runtime – CLR) • New libraries (Base Class Library – BCL) • Changes to make the Cross Platform story work • Scenarios taking advantage from Net Core (currently) are: • ASP.NET Core: new ASP.NET stack, re-written from scratch • Containerized applications / docker - ready • Cloud Applications: Applications and Microservices running on Azure • Universal Windows Platform: Windows Store Apps (cross-device) • Console Application: the best way to start testing Net Core
  • 5. Cross-Platform = No first-class Operating System • Official daily compilations on GitHub include many OSes • CentOS, Debian, FreeBSD, openSUSE, RedHat, Linux Mint, Ubuntu 14.04 to 16.10, Alpine Linux, … • OSX 10.11 • Windows Occasionally this may happen :)
  • 6. The Big Picture • Libraries using just CoreFX can be shared across all the Application Models • Runtime Adaptation Layers are specific to a given Platform / CPU • x86, x64, ARM, ... (more CPUs are coming in town) • Modular design for future extensions • New Application Models • New Operating Systems / Platforms • New CLR variants Runtime Adaption Level CoreCLR .NET Native … .NET Standard Library Runtime Adaption Level … … ASP.NET WPF Win Forms ASP.NET CORE UWP OS X iOS Android .NET Framework "Classic" .NET CORE Xamarin / Mono CoreFX
  • 7. The unified Command Line called "dotnet" • The CLI (Command Line Interface) is back • In the cross-platform world is the common denominator • Nanoservers, IoT devices, etc. are controlled using the command line • Deploy tasks can be automated • Easy to install on a fresh machine • Visual Studio will provide the UI for all the CLI commands • Support "extensions" to add commands • downloaded via dotnet restore
  • 8. Hands on the DotNet CLI 1. Install the CLI 2. Create an App 3. Write some code 4. Restore packages 5. Run the app mkdir myapp cd myapp dotnet new dotnet restore http://dot.net/ http://dot.net/ Commands: new Initialize .NET projects. restore Restore dependencies specified in the .NET project. build Builds a .NET project. publish Publishes a .NET project for deployment (including the runtime). run Compiles and immediately executes a .NET project. test Runs unit tests using the test runner specified in the project. pack Creates a NuGet package. migrate Migrates a project.json based project to a msbuild based project. clean Clean build output(s). sln Modify solution (SLN) files. Project modification commands: add Add items to the project remove Remove items from the project list List items in the project Advanced Commands: nuget Provides additional NuGet commands. msbuild Runs Microsoft Build Engine (MSBuild). vstest Runs Microsoft Test Execution Command Line Tool. dotnet run ... https://github.com/dotnet/cli
  • 9. Netstandard • A library specification defining a set of APIs with no implementation • Think to netstandard as it was a huge interface • All NET Frameworks must implement all those APIs • CoreFX is a superset of netstandard • https://github.com/dotnet/corefx • The review board defines the number of netstandard APIs • No platform specific APIs but abstractions to access to the OS services • Only APIs that should be always available • Netstandard avoid the confusion of external libraries • NodeJS suffers from this problem https://github.com/dotnet/standard/
  • 10. NetStandard versions vs Platforms Framework TFM .NET Standard netstandard 1.0 1.1 1.2 1.3 1.4 1.5 1.6 2.0 .NET Core netcoreapp 1.0 2.0 .NET Framework net 4.5 4.5.1 4.6 4.6.1 4.6.2 vNext 4.6.1 Mono / Xamarin - vNext UWP uap vNext Windows win 8.0 8.1 Windows Phone wpa 8.1 Silverlight wp 8.0 (obsolete frameworks) more APIs more Frameworks Unity Game Framework is going to support netstandard 2.0 Version # of APIs netstandard 1.6 13,501 netstandard 2.0 32,638
  • 11. API Cross-Reference • A cross-reference with all .NET APIs • Availability of every APIs in the .NET Framework, Mono, Net Core, … • Answers to the question: which framework does support this API? http://apisof.net
  • 12. Packages • Nuget is the package manager in the .net environment • There is a 1:1:1 relationship among namespace, dll and package • System.Reflection => System.Reflection.dll => Sytem.Reflection.nupkg • Every package may be released "out of band" • No more waiting for the next «.Net Framework Runtime» • A Metapackage is a 'fake' package redirecting to several real packages • It does not contain dlls but just references to other packages
  • 13. Metapackages • Metapackages makes developer's life easier • They are predefined sets of commonly used packages • The NETStandard.Library Metapackage • It references the libraries that are part of the ".NET Standard Library" • The Microsoft.NETCore.App Metapackage • It references the libraries that are part of the .NET Core distribution • It is a larger set than NETStandard.Library • The Microsoft.NETCore.Portable.Compatibility Metapackage • The compatibility façades enabling PCLs based on mscorlib to run on NetCore
  • 14. How Projects specify the framework • A NetCore app / library • targets • references Microsoft.NETCore.App • A Netstandard library targets • targets • references NETStandard.Library • Future 2.0 netcore apps • targets • To run on a specific framework version (this may change in the future) <TargetFramework>netcoreapp1.1</TargetFramework> <TargetFramework>netstandard1.4</TargetFramework> <TargetFramework>netcoreapp2.0</TargetFramework> <RuntimeFrameworkVersion>2.0.0-beta-25108-01</RuntimeFrameworkVersion>  Never reference these metapackages in the nuget references
  • 15. Self-Contained Depolyment (SCD) • Visual Studio 2017 has a "Publish" menu in the solution explorer • Using the CLI: • The RIDs (Runtime Identifiers) must be specified in the csproj • The nuget package Microsoft.NETCore.Platforms contains the all the available RIDs <RuntimeIdentifiers>win8-arm;ubuntu.14.04-arm;ubuntu.16.04-arm</RuntimeIdentifiers> dotnet publish –r ubuntu.14.04-arm –o folder –c Release
  • 16. Reducing the footprint of the SCD • Replace netcoreapp1.1 with netstandard1.6 • Explicitly reference these base packages <ItemGroup> <PackageReference Include="Microsoft.NETCore.Runtime.CoreCLR" Version="1.0.2" /> <PackageReference Include="Microsoft.NETCore.DotNetHostPolicy" Version="1.0.1" /> </ItemGroup> <TargetFramework>netstandard1.6</TargetFramework> Standard templates Console WebApp Default win10-x64 45.6 MB 55.5 MB Default ubuntu.16.04-x64 52.6 MB 62.6 MB Reduced win10-x64 28.5 MB 47.4 MB Reduced ubuntu.16.04-x64 36.8 MB 55.9 MB
  • 17. Why adopting Net Core? • It's fast! • https://github.com/aspnet/benchmarks • It small and ready for container and microsevices! • Docker on x86-x64 is already available! • With 2.0 we will have Docker on ARM devices • It's the familiar .NET you already know! • Netstandard libraries can be used across all the frameworks • The upcoming 2.0 version will provide a shim for cross-framework calls
  • 18. What's next? • ARM support is coming with netcore 2.0 and netstandard 2.0 • Come to the Exhibition Zone to see a demo with a Raspberry PI! • Interoperability with Node.JS • Come to my session tomorrow, April 2nd, 1.30 - 2.10pm • Use your C# libraries from Node.JS