Frage

I have created a multi-project template and when creating a new project I'm having success installing nuget packages into all my projects when it comes to regular release versions, but I'm trying to grab signalr's prerelease version and it can't find the version '1.0.0-alpha2'. I assume because its a prelease. Although I can grab it from within VS's PM prompt using :

Install-Package Microsoft.AspNet.SignalR.JS -version 1.0.0-alpha2 

...Is there something different with the API that I need to do to grab it or what am I doing wrong?

Example within my project templates wizard

 var componentModel = (IComponentModel)services.GetService(typeof(SComponentModel));
 IVsPackageInstaller installerServices = componentModel.GetService<IVsPackageInstaller();

 installerServices.InstallPackage("http://packages.nuget.org", project, "Microsoft.AspNet.SignalR.JS", "1.0.0-alpha2", false);
War es hilfreich?

Lösung

Okay this works with https://www.nuget.org/api/v2/ as the target, not the older v1 at packages.nuget.org. Found out v2 with fiddler

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top