getting started .net core

22
Getting Started .NET Core 2016/10/31 Fukuoka.NET @tsubakimoto_s

Upload: yuta-matsumura

Post on 09-Feb-2017

208 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Getting Started .NET Core

Getting Started .NET Core

2016/10/31 Fukuoka.NET

@tsubakimoto_s

Page 2: Getting Started .NET Core

About me

Yuta Matsumura

Alterbooth, Inc.

Microsoft MVP(Visual Studio and Development Technologies)

C#, VB.NET, PHP, Frontend, Azure

Community

2

MLBお兄さん

yuta.matsumura.31

Page 3: Getting Started .NET Core

3

Page 4: Getting Started .NET Core

4

どっとねっとこあ?

Page 5: Getting Started .NET Core

.NET Core

• .NET Frameworkのオープンソース版

•クロスプラットフォーム (Mac, Linux)

•バージョン

• 1.0 ... 2016/06

• 1.1-preview ... 2016/10

5

Page 6: Getting Started .NET Core

テンプレート

6

•クラスライブラリ

•コンソールアプリケーション

•ASP.NET Core Webアプリケーション

Page 7: Getting Started .NET Core

7

Flexible

deployment

Cross-

platform

Command-

line toolsCompatible

Open sourceSupported

by Microsofthttps://docs.microsoft.com/ja-jp/dotnet/articles/core/index

Page 8: Getting Started .NET Core

Cross-platform

Windows (Client, Server)RHELFedoraDebianUbuntuLinux MintopenSUSECentOSOracle LinuxMac OS X

8https://github.com/dotnet/core/blob/master/roadmap.md#technology-roadmaps

Page 9: Getting Started .NET Core

Command-line tools

9

Page 10: Getting Started .NET Core

dotnetコマンド

コマンド名 機能

dotnet new プロジェクトの新規作成

dotnet restore NuGetパッケージの復元

dotnet run プロジェクトの実行

dotnet build プロジェクトのビルド

dotnet test 単体テストの実行

dotnet pack プロジェクトをNuGetパッケージに変換

dotnet publish プロジェクトの発行(=公開用ファイルの生成)

10

Page 11: Getting Started .NET Core

dotnetコマンド

コマンド名 機能

dotnet new プロジェクトの新規作成

dotnet restore NuGetパッケージの復元

dotnet run プロジェクトの実行

dotnet build プロジェクトのビルド

dotnet test 単体テストの実行

dotnet pack プロジェクトをNuGetパッケージに変換

dotnet publish プロジェクトの発行(=公開用ファイルの生成)

11

Page 12: Getting Started .NET Core

NuGet

•https://www.nuget.org/

• .NET向けのパッケージマネージャ

•ライブラリ

•フレームワーク

•テンプレート etc

12

Page 13: Getting Started .NET Core

他言語のパッケージマネージャ

PHP : Composer Node.js : npm

13

Page 14: Getting Started .NET Core

Compatible

14

.NET Standard Library

.NET Core

(1.0 → 2.0 ※)

http://www.publickey1.jp/blog/16/netnet_standard.html

Page 15: Getting Started .NET Core

15https://docs.com/inoue-akira/8113

Page 16: Getting Started .NET Core

16http://www.hanselman.com/blog/SharingAuthorizationCookiesBetweenASPNET4xAndASPNETCore10.aspx

Page 17: Getting Started .NET Core

Open Source

17

dotnet/standard

dotnet/corefx dotnet/coreclr

dotnet/roslyn

dotnet/cli dotnet/docs

Page 18: Getting Started .NET Core

Windowsで使う

•インストール

• Visual Studio 2015 Update3

• Visual Studio Community 2015

• .NET Core 1.0.1 Tooling Preview 2

18

Page 19: Getting Started .NET Core

19

DEMO

Windowsで.NET Coreアプリを作る

https://docs.microsoft.com/ja-jp/dotnet/articles/core/tutorials/using-on-windows

Page 20: Getting Started .NET Core

project.json

•プロジェクト情報

•メタデータ

•コンパイル情報

•依存関係

20

Page 21: Getting Started .NET Core

project.json

{

"version": "1.0.0-*",

"buildOptions": {

"emitEntryPoint": true

},

"dependencies": {

"Microsoft.NETCore.App": {

"type": "platform",

"version": "1.0.1"

}

},

"frameworks": {

"netcoreapp1.0": {

"imports": "dnxcore50"

}

}

}

21

https://docs.microsoft.com/ja-jp/dotnet/articles/core/tools/project-json

プロジェクトのバージョン番号⇒NuGetパッケージのバージョン番号

ビルド情報

依存関係の定義

フレームワーク情報“netcoreapp1.0” = .net coreアプリ

https://blogs.msdn.microsoft.com/cesardelatorre/2016/06/28/running-net-core-apps-on-multiple-frameworks-and-what-the-target-framework-monikers

Page 22: Getting Started .NET Core

Thank you!!