RESOLVED - Can the nuget dependencies be reduced?

Jul 20, 2015 at 2:35 PM
Hello, I'm writing a windows server application and want to use Casablanca for all of my RESTful needs :)

However, when I add the cpprestsdk nuget package to my application I get 1.5 gigs worth of stuff. Some of which I don't need (winapp, winxp, winphone, winphonesl).

When I try to JUST add windesktop I get dependency compiler errors stating that I need each of the aforementioned packages in order for compilation to continue.

Anyone out there have any suggestions on how I can fix this via nuget? I don't want to get into managing all the headers and stuff myself. That's why nuget is so handy.

Jul 20, 2015 at 7:28 PM
I second that! when it is ok on desktop with wired connection it takes ages on laptop just to download all this stuff and start building. It would be lovely to have only what you really need to start working
Jul 20, 2015 at 7:36 PM
Yes if you download our main NuGet package, here, then you will get all different binary variations we produce spanning v120, v140, Windows desktop, XP, phone, store, etc... However if you take a closer look the main package has a series of package dependencies. Each of these is split up back on what exactly one Visual Studio project file would likely need to pull in. I.e. on platform and toolset. So for example here is the Windows v120 desktop only package, if you directly reference just this package then that is all you will have to download. Similarly there are separate packages for phone, xp, etc... I think this is exactly what you both want.

The package splitting work was done starting with the 2.5.0 release, you can fine more information on it in the release notes.

Jul 20, 2015 at 9:31 PM
Hey Steve,

I tried just including the v120.windesktop library but as stated I get nuget errors stating that there is a dependency in windesktop to winxp. winxp has a dependency on winapp. winapp has a dependency on winphone, etc.
Jul 20, 2015 at 9:34 PM
Hi stunney,

Can you describe the exactly actions you are doing? Because the v120 Windows desktop NuGet package doesn't have any dependencies. And I've tested it and it works stand alone for me. Did you remember to remove the main aggregate NuGet package that you were using before?

Jul 21, 2015 at 2:55 PM
I have completely deleted all of the cpprestsdk* packages from my project, packages folder, and cache (%LOCALAPPDATA%\NuGet\Cache).

I have now gone in via VS 2013 and added cpprestsdk.v120.windesktop.msvcstl.dyn.rt-dyn. It is the only one with a green checkmark beside it.

My main project compiles. Strange this did not happen before, I got a nuget dependency issue. I must have still had cpprestsdk installed as a parent project somehow and NOT had the other portions installed?! I have made no manual modifications to any of my packages.xml files in my source tree.

I guess this was a PEBKAC :( Apologies for this.