このチュートリアルでは、サーバー エクスプローラーの [SharePoint 接続] ノードの拡張機能から SharePoint クライアント オブジェクト モデルを呼び出す方法について説明します。SharePointクライアント オブジェクト モデルを使用する方法の詳細については、SharePoint オブジェクト モデルの呼び出しを参照してください。
このチュートリアルでは、次のタスクを実行します。
サーバー エクスプローラーの [SharePoint 接続] ノードを拡張する Visual Studio 拡張機能を作成する。具体的には次の点を拡張します。
拡張子は **[サーバー エクスプローラ]**の各SharePointサイト ノードに [Web パーツ ギャラリー] のノードを追加します。この新しいノードには、サイト上の Web パーツ ギャラリー内の個々の Web パーツを表す子ノードが表示されます。
拡張機能では、Webパーツのインスタンスを表す新しいノード型を定義します。新しい Web パーツ ギャラリー ノードの子ノードには、このノード型が使用されます。新しいWebパーツ ノード型は、ノードが表すWebパーツに関する [プロパティ] のウィンドウに表示します。
拡張機能を配置するための Visual Studio Extension (VSIX) パッケージを構築する。
拡張機能をデバッグしてテストする。
[!メモ]
このチュートリアルで作成する拡張機能は、チュートリアル: サーバー エクスプローラーを拡張して Web パーツを表示するで作成する拡張機能に似ています。チュートリアルでは、SharePointサーバー オブジェクト モデル、このチュートリアルを使用することが同じタスクを実行するクライアント オブジェクト モデルを使用します。
必須コンポーネント
このチュートリアルを実行するには、開発コンピューターに次のコンポーネントが必要です。
Windows SharePoint、およびサポートされるVisual Studioのエディション。詳細については、「SharePoint ソリューションの開発要件」を参照してください。
Visual Studio SDK。このチュートリアルでは、拡張機能を配置するための VSIX パッケージを、SDK の VSIX プロジェクト テンプレートを使用して作成します。詳細については、「Visual Studio の SharePoint ツールの拡張」を参照してください。
次の概念に関する知識があると役に立ちますが、チュートリアルを実行するうえで必須というわけではありません。
SharePoint クライアント オブジェクト モデルの使用。詳細については、「Managed Client Object Model (マネージ クライアント オブジェクト モデル)」を参照してください。
SharePoint Webパーツ。詳細については、「Web Parts Overview (Web パーツの概要)」を参照してください。
プロジェクトの作成
このチュートリアルを完了するには、2 つのプロジェクトを作成する必要があります。
サーバー エクスプローラーの拡張機能を配置するために VSIX パッケージを作成する VSIX プロジェクト。
サーバー エクスプローラーの拡張機能を実装するクラス ライブラリ プロジェクト。
この 2 つのプロジェクトを作成することから始めます。
VSIX プロジェクトを作成するには
Visual Studio を起動します。
メニュー バーで [ファイル]、[新規]、[プロジェクト] の順にクリックします。
[新しいプロジェクト] のダイアログ ボックスで、[Visual C#] または [Visual Basic] のノードを展開し、**[機能拡張]**を選択します。
[!メモ]
[機能拡張] のノードは、Visual Studio SDKをインストールするときだけです。詳細については、このトピックで前に説明した「前提条件」を参照してください。
ダイアログ ボックスの上部に、.NET Frameworkのバージョンの [.NET Framework 4.5] リストのを選択します。
SharePointツールの拡張機能はバージョンの.NET Frameworkの機能が必要です。
[VSIX プロジェクト] テンプレートを選択します。
[名前] ボックスに" [WebPartNode]は、を [OK] のボタンをクリックします。
Visual Studio のソリューション エクスプローラーに WebPartNode プロジェクトが追加されます。
拡張機能プロジェクトを作成するには
**[ソリューション エクスプローラー]で、ソリューション ノードのショートカット メニューを開き、[追加]**を選択し、を **[新しいプロジェクト]**を選択します。
[!メモ]
Visual Basic プロジェクトでソリューション エクスプローラーにソリューション ノードが表示されるのは、General, Projects and Solutions, Options Dialog Boxの [常にソリューションを表示] チェック ボックスがオンになっている場合だけです。
[新しいプロジェクト] のダイアログ ボックスで、[Visual C#] または [Visual Basic] のノードを展開し、**[ウィンドウ]**を選択します。
ダイアログ ボックスの上部に、.NET Frameworkのバージョンの [.NET Framework 4.5] リストのを選択します。
プロジェクト テンプレートの一覧で、**[クラス ライブラリ]**を選択します。
[名前] ボックスに、[WebPartNodeExtension]を入力し、を [OK] のボタンをクリックします。
Visual Studio によって、WebPartNodeExtension プロジェクトがソリューションに追加され、既定の Class1 コード ファイルが開きます。
Class1 コード ファイルをプロジェクトから削除します。
拡張機能プロジェクトの構成
拡張機能を作成するためのコードを記述する前に、プロジェクトのコード ファイルおよびアセンブリ参照を追加して既定の名前空間を更新する必要があります。
プロジェクトを構成するには
[WebPartNodeExtension] のプロジェクトでは、SiteNodeExtension、WebPartNodeTypeProviderという2種類のコード ファイルを追加します。
WebPartNodeExtensionプロジェクトのショートカット メニューを開き、**[参照の追加]**を選択します。
[マネージャーの– WebPartNodeExtensionを参照してください。] のダイアログ ボックスで、[Framework] のノードを選択し、System.ComponentModel.CompositionおよびSystem.Windows.Formsの各アセンブリのチェック ボックスをオンにします。
[拡張機能] のノードを選択し、次のアセンブリのチェック ボックスをオンに [OK] のボタンを選択する:
Microsoft.SharePoint.Client
Microsoft.SharePoint.Client.Runtime
Microsoft.VisualStudio.SharePoint
[WebPartNodeExtension] のプロジェクトのショートカット メニューを開き、**[プロパティ]**を選択します。
プロジェクト デザイナーが開きます。
[アプリケーション] のタブをクリックします。
[既定の名前空間] ボックス (C#)、または [ルート名前空間] ボックス (Visual Basic) に、ServerExplorer.SharePointConnections.WebPartNodeを入力します。
新しいノードのアイコンの作成
[サーバー エクスプローラ] 拡張機能の2種類のアイコンを作成します: [Web パーツ ギャラリー] の新しいノードのアイコンと [Web パーツ ギャラリー] ノードの下の各子Webパーツのノードのアイコン。後で、これらのアイコンをノードに関連付けるコードを記述します。
ノードのアイコンを作成するには
WebPartNodeExtensionプロジェクトの [プロジェクト デザイナー] では、[リソース] のタブをクリックします。
この プロジェクトで既定のリソース ファイルを含まないリンクを選択します。ファイルを作成するには、ここをクリックしてください。] をクリックします。
Visual Studioは、リソース ファイルが開きますをデザイナーで開きます作成します。
デザイナーの上部で、[リソースの追加] のメニュー コマンドの矢印をクリックし、**[新しいアイコンの追加]**を選択します。
新しいアイコン名の WebPartsNode を入力し、を [追加] のボタンをクリックします。
イメージ エディターに新しいアイコンが表示されます。
簡単に検証しやすいデザインとなるよう16x16版のアイコン ファイルを編集します。
32x32版のアイコンのショートカット メニューを開き、**[イメージ タイプの削除]**を選択します。
手順3からプロジェクト リソースに2番目のアイコンを追加する7を繰り返します。このアイコン [Web パーツ]を表示します。
[WebPartNodeExtension] のプロジェクトの [リソース] フォルダーの **[ソリューション エクスプローラー]では、[WebPartsNode.ico]**を選択します。
[プロパティ] のペインで、[ビルド アクション] のリストを開き、**[埋め込みリソース]**を選択します。
WebPart.ico について最後の 2 つの手順を繰り返します。
サーバー エクスプローラーへの Web パーツ ギャラリー ノードの追加
各 SharePoint サイト ノードに新しい Web パーツ ギャラリー ノードを追加するクラスを作成します。新しいノードを追加するため、このクラスに IExplorerNodeTypeExtension インターフェイスを実装します。サーバー エクスプローラーの既存のノードの動作を拡張 (ノードに新しい子ノードを追加するなど) する場合は必ず、このインターフェイスを実装します。
サーバー エクスプローラーに Web パーツ ギャラリー ノードを追加するには
[WebPartNodeExtension] のプロジェクトの [SiteNodeExtension] コード ファイルに次のコードを貼り付けます。
[!メモ]
このコードを追加すると、いくつかのコンパイル エラーがあります。これらのエラーは、この後の手順でコードを追加すると解消されます。
Imports System.Collections.Generic Imports System.ComponentModel.Composition Imports Microsoft.SharePoint.Client Imports Microsoft.VisualStudio.SharePoint Imports Microsoft.VisualStudio.SharePoint.Explorer Namespace ServerExplorer.SharePointConnections.WebPartNode ' Export attribute: Enables Visual Studio to discover and load this extension. ' ExplorerNodeType attribute: Indicates that this class extends SharePoint site nodes in Server Explorer. ' SiteNodeExtension class: Represents an extension of SharePoint site nodes in Server Explorer. <Export(GetType(IExplorerNodeTypeExtension))> _ <ExplorerNodeType(ExplorerNodeTypes.SiteNode)> _ Friend Class SiteNodeExtension Implements IExplorerNodeTypeExtension Private siteUrl As System.Uri = Nothing Private Sub Initialize(ByVal nodeType As IExplorerNodeType) _ Implements IExplorerNodeTypeExtension.Initialize ' The NodeChildrenRequested event is raised when the user expands the ' SharePoint site node in Server Explorer. AddHandler nodeType.NodeChildrenRequested, AddressOf NodeChildrenRequested End Sub ' Creates the new Web Part Gallery node with the specified icon. Private Sub NodeChildrenRequested(ByVal Sender As Object, ByVal e As ExplorerNodeEventArgs) ' Get the site URL so that it can be used later to access the site ' by using the SharePoint client object model. siteUrl = e.Node.Context.SiteUrl ' The CreateWebPartNodes argument is a delegate that Visual Studio calls ' to create the child nodes under the Web Part Gallery node. e.Node.ChildNodes.AddFolder("Web Part Gallery", My.Resources.WebPartsNode.ToBitmap(), _ AddressOf CreateWebPartNodes) End Sub ' Creates individual Web Part nodes under the new Web Part Gallery node. Private Sub CreateWebPartNodes(ByVal parentNode As IExplorerNode) ' Use the SharePoint client object model to get items from the Web Part gallery. Dim Context As ClientContext = New ClientContext(siteUrl.AbsoluteUri) Dim WebPartsGallery As List = Context.Web.GetCatalog(CType(ListTemplateType.WebPartCatalog, Integer)) Dim WebParts As ListItemCollection = WebPartsGallery.GetItems(New CamlQuery()) ' Request the FieldValuesAsText property values with the Web Part items. Context.Load(WebParts, Function(listItems) listItems.Include(Function(i) i.FieldValuesAsText)) Context.ExecuteQuery() If WebParts IsNot Nothing Then For Each WebPart As ListItem In WebParts ' Create a new annotation object to store the current Web Part item with the new node. Dim Annotations = New Dictionary(Of Object, Object)() Annotations.Add(GetType(ListItem), WebPart) ' Create the new node for the current Web Part item. parentNode.ChildNodes.Add(WebPartNodeTypeProvider.WebPartNodeTypeId, _ WebPart.FieldValuesAsText.FieldValues("Title"), Annotations) Next End If End Sub End Class End Namespaceusing System.Collections.Generic; using System.ComponentModel.Composition; using Microsoft.SharePoint.Client; using Microsoft.VisualStudio.SharePoint; using Microsoft.VisualStudio.SharePoint.Explorer; namespace ServerExplorer.SharePointConnections.WebPartNode { // Enables Visual Studio to discover and load this extension. [Export(typeof(IExplorerNodeTypeExtension))] // Indicates that this class extends SharePoint site nodes in Server Explorer. [ExplorerNodeType(ExplorerNodeTypes.SiteNode)] // Represents an extension of SharePoint site nodes in Server Explorer. internal class SiteNodeExtension : IExplorerNodeTypeExtension { private System.Uri siteUrl = null; public void Initialize(IExplorerNodeType nodeType) { // The NodeChildrenRequested event is raised when the user expands the // SharePoint site node in Server Explorer. nodeType.NodeChildrenRequested += NodeChildrenRequested; } // Creates the new Web Part Gallery node with the specified icon. private void NodeChildrenRequested(object sender, ExplorerNodeEventArgs e) { // Get the site URL so that it can be used later to access the site // by using the SharePoint client object model. siteUrl = e.Node.Context.SiteUrl; // The CreateWebPartNodes argument is a delegate that Visual Studio calls // to create the child nodes under the Web Part Gallery node. e.Node.ChildNodes.AddFolder("Web Part Gallery", Properties.Resources.WebPartsNode.ToBitmap(), CreateWebPartNodes); } // Creates individual Web Part nodes under the new Web Part Gallery node. private void CreateWebPartNodes(IExplorerNode parentNode) { // Use the SharePoint client object model to get items from the Web Part gallery. ClientContext context = new ClientContext(siteUrl.AbsoluteUri); List webPartsGallery = context.Web.GetCatalog((int)ListTemplateType.WebPartCatalog); ListItemCollection webParts = webPartsGallery.GetItems(new CamlQuery()); // Request the FieldValuesAsText property values with the Web Part items. context.Load(webParts, listItems => listItems.Include(i => i.FieldValuesAsText)); context.ExecuteQuery(); if (webParts != null) { foreach (ListItem webPart in webParts) { // Create a new annotation object to store the current Web Part item with the new node. var annotations = new Dictionary<object, object>() { { typeof(ListItem), webPart } }; // Create the new node for the current Web Part item. parentNode.ChildNodes.Add(WebPartNodeTypeProvider.WebPartNodeTypeId, webPart.FieldValuesAsText.FieldValues["Title"], annotations); } } } } }
Web パーツを表すノード型の定義
Web パーツを表す新しいノード型を定義したクラスを作成します。Visual Studioは、[Web パーツ ギャラリー] のノードの子ノードを表示するには、この新しいノード型を使用します。それぞれの子ノードは、SharePoint サイト上の単一の Web パーツを表します。
新しいノード型を定義するため、このクラスに IExplorerNodeTypeProvider インターフェイスを実装します。このインターフェイスは、サーバー エクスプローラーに新しい種類のノードを定義する場合に必ず実装します。
Web パーツ ノード型を定義するには
[WebPartNodeExtension] のプロジェクトの [WebPartNodeTypeProvider] コード ファイルに次のコードを貼り付けます。
Imports System Imports System.Collections.Generic Imports System.Windows.Forms Imports System.ComponentModel.Composition Imports Microsoft.SharePoint.Client Imports Microsoft.VisualStudio.SharePoint Imports Microsoft.VisualStudio.SharePoint.Explorer Namespace ServerExplorer.SharePointConnections.WebPartNode ' Export attribute: Enables Visual Studio to discover and load this extension. ' ExplorerNodeType attribute: Specifies the ID for this new node type. ' WebPartNodeTypeProvider class: Defines a new node type that represents a Web Part on a SharePoint site. <Export(GetType(IExplorerNodeTypeProvider))> _ <ExplorerNodeType(WebPartNodeTypeProvider.WebPartNodeTypeId)> _ Friend Class WebPartNodeTypeProvider Implements IExplorerNodeTypeProvider Friend Const WebPartNodeTypeId As String = "Contoso.WebPart" Private Sub InitializeType(ByVal typeDefinition As IExplorerNodeTypeDefinition) _ Implements IExplorerNodeTypeProvider.InitializeType typeDefinition.DefaultIcon = My.Resources.WebPart.ToBitmap() typeDefinition.IsAlwaysLeaf = True AddHandler typeDefinition.NodePropertiesRequested, AddressOf NodePropertiesRequested AddHandler typeDefinition.NodeMenuItemsRequested, AddressOf NodeMenuItemsRequested End Sub ' Retrieves properties that are displayed in the Properties window when ' a Web Part node is selected. Private Sub NodePropertiesRequested(ByVal Sender As Object, _ ByVal e As ExplorerNodePropertiesRequestedEventArgs) Dim webPart = e.Node.Annotations.GetValue(Of ListItem)() Dim propertySource = e.Node.Context.CreatePropertySourceObject( _ webPart.FieldValuesAsText.FieldValues) e.PropertySources.Add(propertySource) End Sub Private Sub NodeMenuItemsRequested(ByVal Sender As Object, _ ByVal e As ExplorerNodeMenuItemsRequestedEventArgs) Dim WebPartNodeMenuItem As IMenuItem = e.MenuItems.Add("Display Message") AddHandler WebPartNodeMenuItem.Click, AddressOf MenuItemClick End Sub Private Sub MenuItemClick(ByVal Sender As Object, ByVal e As MenuItemEventArgs) Dim ParentNode As IExplorerNode = TryCast(e.Owner, IExplorerNode) If ParentNode IsNot Nothing Then Dim webPart = ParentNode.Annotations.GetValue(Of ListItem)() MessageBox.Show("You clicked the context menu for the following Web part: " & _ webPart.FieldValuesAsText.FieldValues("Title") + ".", "Web Part Menu Command") End If End Sub End Class End Namespaceusing System; using System.Collections.Generic; using System.Windows.Forms; using System.ComponentModel.Composition; using Microsoft.SharePoint.Client; using Microsoft.VisualStudio.SharePoint; using Microsoft.VisualStudio.SharePoint.Explorer; namespace ServerExplorer.SharePointConnections.WebPartNode { // Enables Visual Studio to discover and load this extension. [Export(typeof(IExplorerNodeTypeProvider))] // Specifies the ID for this new node type. [ExplorerNodeType(WebPartNodeTypeProvider.WebPartNodeTypeId)] // Defines a new node type that represents a Web Part on a SharePoint site. internal class WebPartNodeTypeProvider : IExplorerNodeTypeProvider { internal const string WebPartNodeTypeId = "Contoso.WebPart"; public void InitializeType(IExplorerNodeTypeDefinition typeDefinition) { typeDefinition.DefaultIcon = Properties.Resources.WebPart.ToBitmap(); typeDefinition.IsAlwaysLeaf = true; typeDefinition.NodePropertiesRequested += NodePropertiesRequested; typeDefinition.NodeMenuItemsRequested += NodeMenuItemsRequested; } // Retrieves properties that are displayed in the Properties window when // a Web Part node is selected. private void NodePropertiesRequested(object sender, ExplorerNodePropertiesRequestedEventArgs e) { var webPart = e.Node.Annotations.GetValue<ListItem>(); object propertySource = e.Node.Context.CreatePropertySourceObject( webPart.FieldValuesAsText.FieldValues); e.PropertySources.Add(propertySource); } private void NodeMenuItemsRequested( object sender, ExplorerNodeMenuItemsRequestedEventArgs e) { e.MenuItems.Add("Display Message").Click += MenuItemClick; } private void MenuItemClick(object sender, MenuItemEventArgs e) { IExplorerNode parentNode = e.Owner as IExplorerNode; if (parentNode != null) { var webPart = parentNode.Annotations.GetValue<ListItem>(); MessageBox.Show("You clicked the context menu for the following Web part: " + webPart.FieldValuesAsText.FieldValues["Title"] + ".", "Web Part Menu Command"); } } } }
チェックポイント
この段階で、Web パーツ ギャラリー ノードに必要なすべてのコードがプロジェクトに揃ったことになります。コンパイル エラーが発生しないことを確認 [WebPartNodeExtension] プロジェクトをビルドします。
プロジェクトをビルドするには
- [ソリューション エクスプローラー]では、[WebPartNodeExtension] のプロジェクトのショートカット メニューを開き、**[ビルド]**を選択します。
拡張機能を配置するための VSIX パッケージの作成
拡張機能を配置するには、ソリューションで VSIX プロジェクトを使用して VSIX パッケージを作成します。まず、プロジェクトに含まれているsource.extension.vsixmanifestファイルを変更して、VSIXパッケージを構成します。ソリューションをビルドしてVSIXパッケージを作成します。
VSIX パッケージを構成するには
[ソリューション エクスプローラー]では、[WebPartNode] のプロジェクトで、[source.extension.vsixmanifest] マニフェスト エディターでファイルを開きます。
source.extension.vsixmanifestファイルは、すべてのVSIXパッケージが必要とするextension.vsixmanifestファイルの基礎です。このファイルの詳細については、「VSIX 拡張機能のスキーマに関するリファレンス」を参照してください。
[製品名] ボックスに、[Web Part Gallery Node for Server Explorer]を入力します。
[作成者] ボックスに、[Contoso]を入力します。
[説明] ボックスに、サーバー エクスプローラーの [SharePoint接続] ノードにカスタムWebパーツ ギャラリー ノードを追加しますを入力します。
エディターの [資産] のタブで、[新規作成] のボタンをクリックします。
[新しい資産の追加] のダイアログ ボックスで、[種類] の一覧で、**[Microsoft.VisualStudio.MefComponent]**を選択します。
[!メモ]
この値は、extension.vsixmanifest ファイル内の MefComponent 要素に対応します。この要素は、VSIX パッケージ内の拡張機能アセンブリの名前を指定します。詳細については、「MEFComponent Element」を参照してください。
[ソース] の一覧で、**[現在のソリューション内のプロジェクト]**を選択します。
[プロジェクト] の一覧で、[WebPartNodeExtension]を選択し、[OK] のボタンをクリックします。
メニュー バーで、[ビルド]、**[ソリューションのビルド]**を選択し、次に、ソリューションのエラーなしでコンパイルしてください。
WebPartNodeプロジェクトのビルド出力フォルダーにWebPartNode.vsixファイルが含まれていることを確認します。
既定では、プロジェクト ファイルに格納されているフォルダーの ..\bin\Debug フォルダーがビルド出力フォルダーです。
拡張機能のテスト
これで、サーバー エクスプローラーの新しい Web パーツ ギャラリー ノードをテストする準備ができました。まず、Visual Studioの実験用インスタンスで拡張機能プロジェクトをデバッグを開始します。次に、Visual Studioの実験用インスタンスで [Web パーツ] の新しいノードを使用します。
拡張機能のデバッグを開始するには
管理資格情報を使用してVisual Studioを再起動し、[WebPartNode] ソリューションを開きます。
WebPartNodeExtensionプロジェクトで、[SiteNodeExtension] コード ファイルを開き、NodeChildrenRequested と CreateWebPartNodes のメソッドのコードの先頭行にブレークポイントを追加します。
F5 キーを押してデバッグを開始します。
Visual Studioは、サーバーExplorer\1.0の%UserProfile%\AppData\Local\Microsoft\VisualStudio\11.0Exp\Extensions\Contoso\Webのパーツ ギャラリー ノードの拡張機能に拡張機能をインストール、Visual Studioの実験用インスタンスを起動します。Visual Studioでプロジェクト項目をテストします。この場合
拡張機能をテストするには
Visual Studioの実験用インスタンスで、メニュー バーで、[表示]、**[サーバー エクスプローラ]**を選択します。
テストに使用する SharePoint サイトが、サーバー エクスプローラーの [SharePoint 接続] ノードに表示されていることを確認します。これが表示されない場合は、次の手順を実行する:
**[SharePoint 接続]のショートカット メニューを開き、[接続の追加]**を選択します。
[SharePoint 接続の追加] のダイアログ ボックスで、接続先の入力し、次に [OK] のボタンを選択します。SharePointサイトのURL。
開発コンピューター上の SharePoint サイトを指定するには、「https://localhost」と入力します。
(サイトのURLを表示する) サイト接続ノードを展開し、子サイト ノード (たとえば、[チーム サイト]) を展開します。
Visual Studioのもう一方のインスタンスで、コードがプロジェクトのデバッグが NodeChildrenRequested のメソッドの前に設定、つもりでF5キーを選択したブレークポイントで停止することを確認します。
Visual Studioの実験用インスタンスで、最上位のサイト ノードの下にある [Web パーツ ギャラリー] のノードを展開します。
Visual Studioのもう一方のインスタンスで、コードがプロジェクトのデバッグが CreateWebPartNodes のメソッドの前に設定、つもりでF5キーを選択したブレークポイントで停止することを確認します。
Visual Studio の実験用インスタンスで、サーバー エクスプローラーの [Web パーツ ギャラリー] ノードに、接続先サイトのすべての Web パーツが表示されていることを確認します。
Webパーツのショートカット メニューを開き、**[プロパティ]**を選択します。
[プロパティ] ペインで、Webパーツに関する詳細が表示されることを確認します。
**[サーバー エクスプローラ]で、同じWebパーツのショートカット メニューを開き、[メッセージを表示する]**を選択します。
表示されたメッセージ ボックスで、[OK] のボタンをクリックします。
Visual Studio からの拡張機能のアンインストール
拡張機能のテストが完了したら、Visual Studioからそれをアンインストールします。
拡張機能をアンインストールするには
Visual Studioの実験用インスタンスで、メニュー バーで、[ツール]、**[拡張機能と更新プログラム]**を選択します。
[拡張機能と更新プログラム] のダイアログ ボックスが表示されます。
拡張機能の一覧で、[Web Part Gallery Node for Server Explorer]を選択し、[アンインストール] のボタンをクリックします。
表示されたダイアログ ボックスで、[○] のボタンをクリックします。
アンインストールを実行するに [今すぐ再起動] のボタンをクリックします。
プロジェクト項目もアンインストールされます。
Visual Studioの実験用インスタンスとインスタンス (WebPartNodeソリューションが開いている) Visual Studioの両方のインスタンスのインスタンスを閉じます。
参照
処理手順
チュートリアル: サーバー エクスプローラーを拡張して Web パーツを表示する
アイコンまたはその他のイメージの作成 (アイコン用イメージ エディター)