I'm trying to make my extension automatically update itself when new versions are pushed to the Visual Studio Gallery. There are a few guides on how one may achieve this, but they are a couple years old and may not apply.
I'm trying to query the IVsExtensionRepository as follows:
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();
At Query_ExecuteCompleted I'm receiving an exception from the server: The remote server returned an error: (400) Bad Request.
A stack trace is provided:
Server stack trace:
at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result) at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result) at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeEndService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
The service is hosted at: https://visualstudiogallery.msdn.microsoft.com/services/dev12/extension.svc
Does anyone know how I can use this service? Either through the IVsExtensionRepository or manually?