3

新しいバージョンが Visual Studio ギャラリーにプッシュされると、拡張機能が自動的に更新されるようにしようとしています。これを達成する方法についていくつかのガイドがありますが、それらは数年前のものであり、適用できない場合があります.

IVsExtensionRepositoryまず、次のようにクエリを実行しようとしています。

var _extensionRepository = (IVsExtensionRepository)Microsoft.VisualStudio.Shell.Package.GetGlobalService(typeof(SVsExtensionRepository));

var query = _extensionRepository.CreateQuery<VSGalleryEntry>(false, true)
                .OrderByDescending(n => n.Ranking)
                .Skip(0)
                .Take(25) as IVsExtensionRepositoryQuery<VSGalleryEntry>;

query.ExecuteCompleted += Query_ExecuteCompleted;
query.ExecuteAsync();

サーバーから例外を受け取りましQuery_ExecuteCompletedた: 「リモート サーバーがエラーを返しました: (400) 不正な要求」

スタック トレースが提供されます。

サーバー スタック トレース: System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult の結果) で System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult の結果) で System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object) [] outs、IAsyncResult 結果) System.ServiceModel.Channels.ServiceChannelProxy.InvokeEndService(IMethodCallMessage methodCall、ProxyOperationRuntime 操作) で System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage メッセージ)

このサービスは、https ://visualstudiogallery.msdn.microsoft.com/services/dev12/extension.svc でホストされています。

Visual Studio ギャラリーから自動的に更新される Visual Studio 拡張機能を作成する方法を知っている人はいますか? または手動IVsExtensionRepositoryで?

4

2 に答える 2