~ Linux & Mac OS でも動く!~
オープンソース & クロスプラットフォーム
.NET の歩き方
井上 章 (いのうえ あきら)
http://aka.ms/chack
日本マイクロソフト株式会社
デベロッパー エクスペリエンス & エバンジェリズム統括本部 (DX)
エバンジェリスト
Drew Robbins (ドリュー ロビンス)
http://www.drewby.com
#devsumiE
 Visual Studio と .NET の新しいアプローチを理解する
 .NET Core 5 の Mac OS, Linux 対応を学ぶ
 ASP.NET 5 の概要を知る
セッションのゴール
Session Takeaways
Microsoft Dev Tools Vision
すべての開発者すべてのアプリ
DevOpsCloud DevelopmentMobile Development
.NET 2015 / ASP.NET 5
Openness
.NET とは?
ライブラリランタイム 言語 ツール
“To move beyond today’s world of stand-alone Web sites to an
Internet of interchangeable components where devices and
services can be assembled into cohesive, user-driven experiences”
Bill Gates on the goal for .NET
Forum 2000
“Web サイトが個々に独立している状態から、交換可能なコンポーネントからなる
インターネットへと移行し、さまざまな デバイスとサービス を組み合わせること
で一貫性のあるユーザー主導のエクスペリエンスを実現する”
.NET 構想における初期のビジョン
Devices and Services
.NET Framework の構成
OS (Windows)
共通言語ランタイム
(CLR : Common Language Runtime)
各種ライブラリ
共通言語基盤
(CLI : Common Language Infrastructure)
VB C# C++ • .NET 対応の開発言語を利用可能
• 型などの共通仕様
• 言語間のコンポーネント呼び出しが可能
• IO, ネットワーク, 暗号化 …
• ASP.NET, ADO.NET …
• 実行制御
(メモリ管理, スレッド制御, 例外処理, セキュリティ …)
・・・
http://aka.ms/connect
(米国イベントサイト: Channel9)
イベント ダイジェスト
• .NET Core Open Source and
Cross-platform
• Visual Studio Community 2013
• Visual Studio 2015 Preview
• .NET 2015 Preview
• Visual Studio 2013 Update 4
• MSDN Updates
 次期バージョン Visual Studio 2015 プレビュー版リリース
 RTM (正式リリース) は 2015 年を予定
※ プレビュー版は Go-live ライセンスではないため運用環境で利用不可
 Azure 仮想マシン イメージが利用可能
 Visual Studio Ultimate 2015 Preview + Windows Server 2012 R2
 .NET 2015
 .NET Framework 4.6 / .NET Core 5
 .NET Compiler Platform (“Roslyn”)
Visual Studio 2015 Preview / CTP 5
Next Version of Visual Studio
http://aka.ms/jpvs2015preview
Visual Studio 2015 Secondary Installer
Visual Studio 2015 インストールで
セットアップされるソフトウェア群
• Android NDK, SDK
• Visual Studio Emulator for Android
• Apache Ant
• Git CLI
• Google Chrome
• Java SE Development Kit
• Joyent Node.js
• WebSocket4Net
 ポピュラーなサードパーティー製ツールを採用
 Bower – Twitter 社製クライアントサイド パッケージ マネージャー
 Grunt, Gulp – node.js ベース ビルドタスク自動化ツール(タスクランナー)
 npm – Node パッケージ マネージャー, Bower, Grunt, Gulp が利用
 ※ .NET Framework 関連のパッケージ マネージャーは NuGet を利用
Visual Studio 2015 Web 開発
Web Development with Visual Studio 2015
.NET Framework & Core
.NET 2015
Next gen JIT (“RyuJIT”)
SIMD (Data Parallelization)
Runtime Compilers
.NET Compiler Platform (“Roslyn”)
Languages innovation
.NET Core 5 Libraries
.NET Framework 4.6 Libraries
NuGet packages
ASP.NET 5
ASP.NET 4.6
WPF
Windows Forms
.NET Framework 4.6 .NET Core 5
ASP.NET 5
.NET Native
Windows desktop
Windows mobile devices
Windows embedded devices
ASP.NET 5 for Mac and Linux
ASP.NET 5 – 軽量, 高速, オープン
www.asp.net/vnext : github.com/aspnet
.NET オープンソース
Projects
• ASP.NET 5
• Entity Framework
• .NET Core 5
• .NET Compiler Platform
• Plus community projects
License
• MIT License
Contribute
• .NET Foundation
• GitHub
https://github.com/aspnet
https://github.com/microsoft/dotnet
http://www.dotnetfoundation.org
 .NET Core 5 のクロスプラット
フォーム対応
 Linux & Mac サポート
(Mono Project)
 Visual Studio の Linux サポート
(Debug, Docker など)
 Sublime Text 拡張
(OmniSharp / Kulture)
Demo …
Direction of Visual Studio and .NET
.NET の今後
Future of .NET
Next gen JIT (“RyuJIT”)
SIMD (Data Parallelization)
ランタイム コンパイラー
.NET Compiler Platform (“Roslyn”)
Languages innovation
BCL and PCL
Entity Framework
ライブラリ
全てのアプリケーション開発のために
オープンソースカンファレンス 2015 Tokyo/Spring
【ハンズオンセミナー】オープン化、軽量化した新生 .NET を体験しよう!
https://www.ospn.jp/osc2015-spring/modules/eguide/event.php?eid=8
Microsoft Virtual Academy
http://aka.ms/msmva
MVA
Microsoft が提供するオンラインラーニングサイト
.NET についてもっと学びたい方は?
ASP.NET 5 概要
http://aka.ms/dev2015_.net
Visual Studioについてもっと学びたい方は?
Visual Studio 2015 Preview
http://aka.ms/dev2015_vs
インフラ技術者、開発者をはじめ、IT に携わるすべてのエンジニアのための
技術コンファレンス
開催日時: 5 月 26 日 (火) - 27 日 (水)
開催場所: ザ・プリンス パークタワー東京
http://aka.ms/decode15
 Yeoman (http://yeoman.io/)
 node ベースのクロスプラットフォーム ツール
 Windows, Mac OS, Linux
 下記の 3 ツールで構成
 yo : スキャフォールディング ツール
 Grunt, Gulp : タスクランナー/ビルドツール
 Bower, npm : パッケージ マネージャー
 Yeoman generator for ASP.NET 5
 ASP.NET 5 プロジェクト生成ツール
Yeoman : Web 開発 クライアント ツール スタック
The web‘s scaffolding tool for modern web apps
 OmniSharp ( http://www.omnisharp.net/ ) オープンソース プロジェクト
 クロスプラットフォーム環境での .NET 開発が可能
 Sublime Text 3, Emacs, Atom, Vim, Brackets …
 Intellisense, ビルド & 実行コマンドなどの機能を提供
OmniSharp : クロスプラットフォーム .NET 開発
OmniSharp Cross platform .NET development
 project.json
 ランタイム バージョンや依存関係などの実行に必要な情報を記述
 Visual Studio 設定などの開発ツール関連情報は含まない
ASP.NET 5 : プロジェクト設定
ASP.NET 5 Runtime
{
"dependencies": {
"Microsoft.AspNet.ConfigurationModel": "1.0.0-alpha4",
}
"commands": {
"web": "Microsoft.AspNet.Hosting server= ..."
},
"configurations": {
"aspnet50": {"dependencies": { ... }},
"aspnetcore50": {"dependencies": { ... }}
}
}
 KRuntime (KRE) : .NET Cross-Platform Runtime (.NET XRE)
 ASP.NET 5 アプリケーションのビルド・実行環境, SDK
 Core CLR, Application Host, Roslyn Loader, …
 K command
 ランタイム エントリ ポイント
 例: “k run”, “k web”, …
 K Version Manager (KVM)
 KRE バージョン管理 : install, upgrade, list, use, alias
 K Package Manager (KPM)
 アプリケーションのパッケージ管理 : restore, install, pack
ASP.NET 5 : ランタイム
ASP.NET 5 Runtime
KRE
K
App
KVM
KPM
 Microsoft.AspNet.Loader.IIS (Helios)
 IIS ホスト
 System.Web には非依存 (Helios ベース)
 他の IIS モジュールとともに統合される
 Microsoft.AspNet.Server.WebListener (WebListener)
 Microsoft.AspNet.Hosting でロードされる (IIS には非依存)
 Http.sys カーネール ドライバー上で直接実行
 Microsoft.AspNet.Server.Kestrel (Kestrel)
 Microsoft.AspNet.Hosting でロードされる (IIS には非依存)
 クロスプラットフォーム (Windows, Mac, Linux) 対応 (予定)
ASP.NET 5 : ホスト サーバー
ASP.NET 5 Servers
 Full .NET CLR
 Visual Studio プロジェクトでデフォルトとなる CLR
 すべての API セットと後方互換性を持つ
 およそ 200 MB, Side-by-Side 実行が可能
 Core CLR (クラウドに最適化されたランタイム)
 ASP.NET 5 のために完全にモジュール化された CLR
 NuGet パッケージとして必要なモジュールだけを組み込める
 およそ 11 MB, Side-by-Side 実行可能
 Cross-Platform CLR
 Linux と Mac OS 対応のクロスプラットフォーム CLR
 ASP.NET 5 アプリケーションの Linux や Mac OS 上での開発と実行が可能
3 つの CLR
Three Runtimes for ASP.NET 5
OpenSource
Operating System
Runtime Loader
Runtime
Platform Libraries
Application Host
Web Server
Application Frameworks
Libraries
Application
Windows
IIS: WebEngine4.dll
Exe: OS
.NET CLR
.NET BCL & FCL
System.Web
IIS
FCL, GAC, NuGet
Loose, GAC, NuGet
MSBuild -> csc.exe
CodeDOM -> csc.exe
Windows, OSX, Linux
“KRE”
.NET CLR
.NET Core CLR
.NET BCL & FCL
.NET on NuGet
“KRE”
IIS, HTTP.SYS
Kestrel
NuGet
NuGet
KRE and Roslyn
.NET Framework .NET Core
 コンテナー型のアプリケーション仮想化技術
 ハイパーバイザー型の仮想化よりも軽量
 オープンソース
Docker とは?
What is Docker?
Server
Host OS
Hypervisor
Guest OS
Bins/Libs
App A
Guest OS
Bins/Libs
App B
Server
Host OS
Docker Engine
Bins/Libs
App A
Bins/Libs
App B
Docker仮想マシン
• Visual Studio 2015 Preview / .NET 2015 Preview
• http://aka.ms/vs2015previewdl
• .NET Core Open Source and Cross-platform
• https://github.com/microsoft/dotnet
• Visual Studio Community 2013
• http://aka.ms/vscomm2013dl
• Visual Studio 2013 Update 4
• http://aka.ms/vs2013ult
Visual Studio 関連リソース
Resources for Visual Studio
© 2015 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and
Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Linux & Mac OS でも動く! ~ オープンソース & クロスプラットフォーム .NET の歩き方 ~

  • 1.
    ~ Linux &Mac OS でも動く!~ オープンソース & クロスプラットフォーム .NET の歩き方 井上 章 (いのうえ あきら) http://aka.ms/chack 日本マイクロソフト株式会社 デベロッパー エクスペリエンス & エバンジェリズム統括本部 (DX) エバンジェリスト Drew Robbins (ドリュー ロビンス) http://www.drewby.com #devsumiE
  • 2.
     Visual Studioと .NET の新しいアプローチを理解する  .NET Core 5 の Mac OS, Linux 対応を学ぶ  ASP.NET 5 の概要を知る セッションのゴール Session Takeaways
  • 4.
    Microsoft Dev ToolsVision すべての開発者すべてのアプリ
  • 5.
  • 6.
    .NET 2015 /ASP.NET 5 Openness
  • 7.
  • 8.
    “To move beyondtoday’s world of stand-alone Web sites to an Internet of interchangeable components where devices and services can be assembled into cohesive, user-driven experiences” Bill Gates on the goal for .NET Forum 2000 “Web サイトが個々に独立している状態から、交換可能なコンポーネントからなる インターネットへと移行し、さまざまな デバイスとサービス を組み合わせること で一貫性のあるユーザー主導のエクスペリエンスを実現する” .NET 構想における初期のビジョン Devices and Services
  • 9.
    .NET Framework の構成 OS(Windows) 共通言語ランタイム (CLR : Common Language Runtime) 各種ライブラリ 共通言語基盤 (CLI : Common Language Infrastructure) VB C# C++ • .NET 対応の開発言語を利用可能 • 型などの共通仕様 • 言語間のコンポーネント呼び出しが可能 • IO, ネットワーク, 暗号化 … • ASP.NET, ADO.NET … • 実行制御 (メモリ管理, スレッド制御, 例外処理, セキュリティ …) ・・・
  • 10.
    http://aka.ms/connect (米国イベントサイト: Channel9) イベント ダイジェスト •.NET Core Open Source and Cross-platform • Visual Studio Community 2013 • Visual Studio 2015 Preview • .NET 2015 Preview • Visual Studio 2013 Update 4 • MSDN Updates
  • 11.
     次期バージョン VisualStudio 2015 プレビュー版リリース  RTM (正式リリース) は 2015 年を予定 ※ プレビュー版は Go-live ライセンスではないため運用環境で利用不可  Azure 仮想マシン イメージが利用可能  Visual Studio Ultimate 2015 Preview + Windows Server 2012 R2  .NET 2015  .NET Framework 4.6 / .NET Core 5  .NET Compiler Platform (“Roslyn”) Visual Studio 2015 Preview / CTP 5 Next Version of Visual Studio http://aka.ms/jpvs2015preview
  • 12.
    Visual Studio 2015Secondary Installer Visual Studio 2015 インストールで セットアップされるソフトウェア群 • Android NDK, SDK • Visual Studio Emulator for Android • Apache Ant • Git CLI • Google Chrome • Java SE Development Kit • Joyent Node.js • WebSocket4Net
  • 13.
     ポピュラーなサードパーティー製ツールを採用  Bower– Twitter 社製クライアントサイド パッケージ マネージャー  Grunt, Gulp – node.js ベース ビルドタスク自動化ツール(タスクランナー)  npm – Node パッケージ マネージャー, Bower, Grunt, Gulp が利用  ※ .NET Framework 関連のパッケージ マネージャーは NuGet を利用 Visual Studio 2015 Web 開発 Web Development with Visual Studio 2015
  • 14.
    .NET Framework &Core .NET 2015 Next gen JIT (“RyuJIT”) SIMD (Data Parallelization) Runtime Compilers .NET Compiler Platform (“Roslyn”) Languages innovation .NET Core 5 Libraries .NET Framework 4.6 Libraries NuGet packages ASP.NET 5 ASP.NET 4.6 WPF Windows Forms .NET Framework 4.6 .NET Core 5 ASP.NET 5 .NET Native Windows desktop Windows mobile devices Windows embedded devices ASP.NET 5 for Mac and Linux
  • 15.
    ASP.NET 5 –軽量, 高速, オープン www.asp.net/vnext : github.com/aspnet
  • 16.
    .NET オープンソース Projects • ASP.NET5 • Entity Framework • .NET Core 5 • .NET Compiler Platform • Plus community projects License • MIT License Contribute • .NET Foundation • GitHub https://github.com/aspnet https://github.com/microsoft/dotnet http://www.dotnetfoundation.org
  • 17.
     .NET Core5 のクロスプラット フォーム対応  Linux & Mac サポート (Mono Project)  Visual Studio の Linux サポート (Debug, Docker など)  Sublime Text 拡張 (OmniSharp / Kulture)
  • 18.
  • 19.
    Direction of VisualStudio and .NET
  • 20.
    .NET の今後 Future of.NET Next gen JIT (“RyuJIT”) SIMD (Data Parallelization) ランタイム コンパイラー .NET Compiler Platform (“Roslyn”) Languages innovation BCL and PCL Entity Framework ライブラリ
  • 21.
  • 23.
    オープンソースカンファレンス 2015 Tokyo/Spring 【ハンズオンセミナー】オープン化、軽量化した新生.NET を体験しよう! https://www.ospn.jp/osc2015-spring/modules/eguide/event.php?eid=8
  • 25.
    Microsoft Virtual Academy http://aka.ms/msmva MVA Microsoftが提供するオンラインラーニングサイト .NET についてもっと学びたい方は? ASP.NET 5 概要 http://aka.ms/dev2015_.net Visual Studioについてもっと学びたい方は? Visual Studio 2015 Preview http://aka.ms/dev2015_vs
  • 26.
    インフラ技術者、開発者をはじめ、IT に携わるすべてのエンジニアのための 技術コンファレンス 開催日時: 5月 26 日 (火) - 27 日 (水) 開催場所: ザ・プリンス パークタワー東京 http://aka.ms/decode15
  • 28.
     Yeoman (http://yeoman.io/) node ベースのクロスプラットフォーム ツール  Windows, Mac OS, Linux  下記の 3 ツールで構成  yo : スキャフォールディング ツール  Grunt, Gulp : タスクランナー/ビルドツール  Bower, npm : パッケージ マネージャー  Yeoman generator for ASP.NET 5  ASP.NET 5 プロジェクト生成ツール Yeoman : Web 開発 クライアント ツール スタック The web‘s scaffolding tool for modern web apps
  • 29.
     OmniSharp (http://www.omnisharp.net/ ) オープンソース プロジェクト  クロスプラットフォーム環境での .NET 開発が可能  Sublime Text 3, Emacs, Atom, Vim, Brackets …  Intellisense, ビルド & 実行コマンドなどの機能を提供 OmniSharp : クロスプラットフォーム .NET 開発 OmniSharp Cross platform .NET development
  • 30.
     project.json  ランタイムバージョンや依存関係などの実行に必要な情報を記述  Visual Studio 設定などの開発ツール関連情報は含まない ASP.NET 5 : プロジェクト設定 ASP.NET 5 Runtime { "dependencies": { "Microsoft.AspNet.ConfigurationModel": "1.0.0-alpha4", } "commands": { "web": "Microsoft.AspNet.Hosting server= ..." }, "configurations": { "aspnet50": {"dependencies": { ... }}, "aspnetcore50": {"dependencies": { ... }} } }
  • 31.
     KRuntime (KRE): .NET Cross-Platform Runtime (.NET XRE)  ASP.NET 5 アプリケーションのビルド・実行環境, SDK  Core CLR, Application Host, Roslyn Loader, …  K command  ランタイム エントリ ポイント  例: “k run”, “k web”, …  K Version Manager (KVM)  KRE バージョン管理 : install, upgrade, list, use, alias  K Package Manager (KPM)  アプリケーションのパッケージ管理 : restore, install, pack ASP.NET 5 : ランタイム ASP.NET 5 Runtime KRE K App KVM KPM
  • 32.
     Microsoft.AspNet.Loader.IIS (Helios) IIS ホスト  System.Web には非依存 (Helios ベース)  他の IIS モジュールとともに統合される  Microsoft.AspNet.Server.WebListener (WebListener)  Microsoft.AspNet.Hosting でロードされる (IIS には非依存)  Http.sys カーネール ドライバー上で直接実行  Microsoft.AspNet.Server.Kestrel (Kestrel)  Microsoft.AspNet.Hosting でロードされる (IIS には非依存)  クロスプラットフォーム (Windows, Mac, Linux) 対応 (予定) ASP.NET 5 : ホスト サーバー ASP.NET 5 Servers
  • 33.
     Full .NETCLR  Visual Studio プロジェクトでデフォルトとなる CLR  すべての API セットと後方互換性を持つ  およそ 200 MB, Side-by-Side 実行が可能  Core CLR (クラウドに最適化されたランタイム)  ASP.NET 5 のために完全にモジュール化された CLR  NuGet パッケージとして必要なモジュールだけを組み込める  およそ 11 MB, Side-by-Side 実行可能  Cross-Platform CLR  Linux と Mac OS 対応のクロスプラットフォーム CLR  ASP.NET 5 アプリケーションの Linux や Mac OS 上での開発と実行が可能 3 つの CLR Three Runtimes for ASP.NET 5
  • 34.
    OpenSource Operating System Runtime Loader Runtime PlatformLibraries Application Host Web Server Application Frameworks Libraries Application Windows IIS: WebEngine4.dll Exe: OS .NET CLR .NET BCL & FCL System.Web IIS FCL, GAC, NuGet Loose, GAC, NuGet MSBuild -> csc.exe CodeDOM -> csc.exe Windows, OSX, Linux “KRE” .NET CLR .NET Core CLR .NET BCL & FCL .NET on NuGet “KRE” IIS, HTTP.SYS Kestrel NuGet NuGet KRE and Roslyn .NET Framework .NET Core
  • 35.
     コンテナー型のアプリケーション仮想化技術  ハイパーバイザー型の仮想化よりも軽量 オープンソース Docker とは? What is Docker? Server Host OS Hypervisor Guest OS Bins/Libs App A Guest OS Bins/Libs App B Server Host OS Docker Engine Bins/Libs App A Bins/Libs App B Docker仮想マシン
  • 36.
    • Visual Studio2015 Preview / .NET 2015 Preview • http://aka.ms/vs2015previewdl • .NET Core Open Source and Cross-platform • https://github.com/microsoft/dotnet • Visual Studio Community 2013 • http://aka.ms/vscomm2013dl • Visual Studio 2013 Update 4 • http://aka.ms/vs2013ult Visual Studio 関連リソース Resources for Visual Studio
  • 37.
    © 2015 MicrosoftCorporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.