SlideShare a Scribd company logo
1 of 19
Download to read offline
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

(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 CodeDeployAmazon Web Services
 
CollabSphere 2020 - NSF ODP Tooling
CollabSphere 2020 - NSF ODP ToolingCollabSphere 2020 - NSF ODP Tooling
CollabSphere 2020 - NSF ODP ToolingJesse Gallagher
 
Continuous Delivery and Infrastructure as Code
Continuous Delivery and Infrastructure as CodeContinuous Delivery and Infrastructure as Code
Continuous Delivery and Infrastructure as CodeSascha 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 MVCSaineshwar bageri
 
Rene Groeschke
Rene GroeschkeRene Groeschke
Rene GroeschkeCodeFest
 
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 XPagesJesse Gallagher
 
Immutable Infrastructure: the new App Deployment
Immutable Infrastructure: the new App DeploymentImmutable Infrastructure: the new App Deployment
Immutable Infrastructure: the new App DeploymentAxel Fontaine
 
.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, NForzaCodemotion Tel Aviv
 
Dev112 let's calendar that
Dev112   let's calendar thatDev112   let's calendar that
Dev112 let's calendar thatHoward Greenberg
 
Conquering AngularJS Limitations
Conquering AngularJS LimitationsConquering AngularJS Limitations
Conquering AngularJS LimitationsValeri 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 OverviewJosh 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 TerraformAvi Networks
 

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 ZikmundKarel 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 ZikmundKarel Zikmund
 
Introduction to dot net
Introduction to dot netIntroduction to dot net
Introduction to dot netQIANG XU
 
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 bitsKen 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 fundamentalsHosein Mansouri
 
Pottnet Meetup Essen - ASP.Net Core
Pottnet Meetup Essen - ASP.Net CorePottnet Meetup Essen - ASP.Net Core
Pottnet Meetup Essen - ASP.Net CoreMalte Lantin
 
Pottnet MeetUp Essen - ASP.Net Core
Pottnet MeetUp Essen - ASP.Net CorePottnet MeetUp Essen - ASP.Net Core
Pottnet MeetUp Essen - ASP.Net CoreMalte Lantin
 
.Net: Introduction, trends and future
.Net: Introduction, trends and future.Net: Introduction, trends and future
.Net: Introduction, trends and futureBishnu 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 StandardAlex 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 ProjectsITCamp
 
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 reimaginedAlex 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 1aminmesbahi
 
.net Core Blimey - Smart Devs UG
.net Core Blimey - Smart Devs UG.net Core Blimey - Smart Devs UG
.net Core Blimey - Smart Devs UGcitizenmatt
 
.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
 

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 GraebeCodeFest
 
Никита Прокопов
Никита ПрокоповНикита Прокопов
Никита Прокопов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 GraebeCodeFest
 
Вадим Смирнов
Вадим СмирновВадим Смирнов
Вадим Смирнов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

SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxRTS corp
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfYashikaSharma391629
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...Akihiro Suda
 

Recently uploaded (20)

Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
 

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