我試圖讓我的擴展程序在新版本推送到Visual Studio庫時自動更新自身。關於如何實現這一目標,有幾條指南,但是它們已經有幾年了,可能不適用。自動更新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(字符串動作,對象[]奏,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
或手動?
嗯,你可能必須建立一個數據包跟蹤,看看發送的查詢是無效的。 – JaredPar 2014-09-23 22:02:49
是的,我想我會試試看。它遍佈SSL,但我認爲這仍然是可能的,這需要我花一些時間來學習如何。 – JoshVarty 2014-09-23 22:07:15