12
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【VS Community 2015】Visual C# 拡張機能 作成メモ

Last updated at Posted at 2016-03-02

はじめに

Visual Studio Community 2015 でVisualC#拡張機能を作成し、
コマンドを作成して実行するところまでやってみました.

バージョン情報
Microsoft Visual Studio Community 2015
Version 14.0.24720.00 Update 1
Microsoft .NET Framework
Version 4.6.01055

プロジェクトの作成

スタートページから"新しいプロジェクト..."を選択
image

テンプレート -> Visual C# -> Extensibility -> VSIX Project を選択
image

OKをクリックすると以下の画面が出てきます.
image

コマンドを作成してみる

ソリューションエクスプローラー上で右クリック
追加(D) -> 新しい項目(W) を選択
image

Extensibility -> Custom Commandを選択して、追加をクリック。 コマンド名は"Command1"としておきます.
image

ソリューションエクスプローラー上にファイルが作成されます
image

この状態でデバッグ(F5)を実行すると,仮想的なVisualStudio(実験的なインスタンス)が立ち上がります.
image

コマンドを実行してみる

ツール -> Invoke Command1 を選択
image

先ほど作成した Command1 が実行されます
image

ソースコードを追ってみると、Command1.csのこの部分のコードが実行されているみたいです.
image

参考

Visual Studio 拡張機能の作り方
http://www.slideshare.net/bonprosoft/visual-studio-51944492

Visual Studioをあなた好みにしてみよう
https://buchizo.wordpress.com/2012/12/02/visual-studio%E3%82%92%E3%81%82%E3%81%AA%E3%81%9F%E5%A5%BD%E3%81%BF%E3%81%AB%E3%81%97%E3%81%A6%E3%81%BF%E3%82%88%E3%81%86/

12
14
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?