19

NuGet でゲット! Visual Studio パッケージ マネージャ―概要

Embed Size (px)

DESCRIPTION

社内勉強会向けで用意した NuGet 概要のスライドです。

Citation preview

Page 1: NuGet でゲット! Visual Studio パッケージ マネージャ―概要
Page 2: NuGet でゲット! Visual Studio パッケージ マネージャ―概要

NuGet でゲット! Visual Studio パッケージ マネージャ―概要

日本マイクロソフト株式会社 デベロッパー & プラットフォーム統括本部 エバンジェリスト

井上 章 (いのうえ あきら)

blogs.msdn.com/chack : twitter.com/chack411

Page 3: NuGet でゲット! Visual Studio パッケージ マネージャ―概要

Session Takeaways

NuGet の概要を知る

NuGet パッケージの利用

NuGet パッケージの作成と公開

NuGet の応用

Page 4: NuGet でゲット! Visual Studio パッケージ マネージャ―概要

NuGet 概要

Page 5: NuGet でゲット! Visual Studio パッケージ マネージャ―概要

NuGet でゲット!

NuGet (ぬげっと / にゅーげっと) とは ...

ヘルパーやオープンソース ライブラリのパッケージ公開と 管理の仕組み

Visual Studio や WebMatrix のパッケージ マネージャ機能

GUI / コンソール の 2 通りの利用方法

NuGet ギャラリーを利用したヘルパーの公開

http://nuget.org/

Page 6: NuGet でゲット! Visual Studio パッケージ マネージャ―概要

http://nuget.codeplex.com/

Document

Source Code

Tools

...

Page 7: NuGet でゲット! Visual Studio パッケージ マネージャ―概要

http://nuget.org/

Package List

Upload

Document

Video

...

Page 8: NuGet でゲット! Visual Studio パッケージ マネージャ―概要

http://stats.nuget.org/

NuGet 統計

Page 9: NuGet でゲット! Visual Studio パッケージ マネージャ―概要

VS 拡張機能

拡張機能 マネージャー

Visual Studio ギャラリー

Page 10: NuGet でゲット! Visual Studio パッケージ マネージャ―概要

ダゕログ vs. コンソール

メニュー [ツール] – [Library Package Manager]

ダゕログ コンソール

Page 11: NuGet でゲット! Visual Studio パッケージ マネージャ―概要

パッケージ依存関係の確認

Page 12: NuGet でゲット! Visual Studio パッケージ マネージャ―概要

設定

パッケージ キャッシュの管理

アップデート チェックの設定

パッケージ ソース

(フィード URL) の設定

・・・

Page 13: NuGet でゲット! Visual Studio パッケージ マネージャ―概要

パッケージの作成

Page 14: NuGet でゲット! Visual Studio パッケージ マネージャ―概要

Razor で、かんたん記述!

App_Code フォルダ にファイルを作成 ファイル名: <ヘルパー名>.cshtml (または .vbhtml )

@helper でヘルパーを定義 (@functions で内部関数の定義も可能)

@helper Memo(string content) { <div class="memo"> <p><strong>メモ:</strong>@content</p>

</div> }

<html> @MyHelper.Memo("ヘルパーを作りました!")

</html>

MyHelper.cshtml

使用例

Page 15: NuGet でゲット! Visual Studio パッケージ マネージャ―概要

NuGet ギャラリーへの登録と公開

カスタム パッケージの登録方法

1. NuGet ギャラリー サイトでユーザー登録

2. NuGet Package Explorer または NuGet.exe をダウンロード

CodePlex - NuGet プロジェクト : http://nuget.codeplex.com/releases

3. 作成したヘルパーに必要なファイル群をパッケージング (.nupkg)

4. NuGet ギャラリーの My Account ページから Access Key を入手

5. 上記ツールで Access Key を使って NuGet ギャラリーへ発行

Page 16: NuGet でゲット! Visual Studio パッケージ マネージャ―概要

NuGet の応用

Page 18: NuGet でゲット! Visual Studio パッケージ マネージャ―概要

Microsoft Web Platform: WebMatrix おすすめ学習コンテンツ http://www.microsoft.com/japan/web/webmatrix/learn/

MSDN ASP.NET デベロッパー センター http://msdn.microsoft.com/ja-jp/asp.net/default.aspx

toAllWebCreative - Web の構築に関わるすべての人々へ http://www.microsoft.com/japan/web/

ASP.NET: The Official Microsoft ASP.NET Site (英語) http://www.asp.net/

ScottGu's Blog (英語) http://weblogs.asp.net/scottgu/default.aspx

THE TRUTH IS OUT THERE ~ 井上 章のブログ ~ http://blogs.msdn.com/chack/

Page 19: NuGet でゲット! Visual Studio パッケージ マネージャ―概要

ご清聴、誠ににありがとうございました!

© 2011 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.