Is the Nu Get package for 2.6 broken?

Sep 3, 2015 at 12:55 PM

I have previously worked with the nu-get packages for casablanca v2.4.0.1 and they worked fine in Visual Studio 2013 Community Edition.

With 2.4 I get one package (C++ REST DSK) and install the Open SSL library package separately.

I set-up and new project today and searched for cpp rest, finally found it on page 6 or something and installed. It pulled in lots of packages including various android, ios, dynamic and static etc. But the include paths don't appear to be set and nothing builds.

Is the Nu Get package for 2.6 broken?

The install documentation is out of date and doesn't give any advice.
Sep 3, 2015 at 1:20 PM
Edited Sep 3, 2015 at 1:21 PM
I just tried a clean project using the following 2.4 package configuration and finding I can't build this straight out the gate either.

Is there any documentation that describes the post nu-get configuration steps?
<?xml version="1.0" encoding="utf-8"?>
  <package id="cpprestsdk" version="" targetFramework="Native" />
  <package id="openssl" version="" targetFramework="Native" />
  <package id="openssl.redist" version="" targetFramework="Native" />
  <package id="zlib" version="" targetFramework="Native" />
  <package id="zlib.redist" version="" targetFramework="Native" />
Sep 3, 2015 at 1:29 PM
Using NuGet 2.8
Sep 3, 2015 at 1:35 PM
What is your target platform?

In version 2.5+ we've switched the NuGet package to a "striped" model, where you can download just the binaries for your target platform(s). For example, if you want to target Windows Desktop using VS 2013, you can use the cpprestsdk.v120.windesktop.msvcstl.dyn.rt-dyn package. We do still have the main cpprestsdk package, but it simply downloads all the other stripes. To convert to using the striped model, you will need to remove the main "cpprestsdk" package first.

Gallery link:
Sep 3, 2015 at 2:09 PM
Thank you very much!

That all seems to be working now, and I see that lots of others follow the striped model (e.g. openssl). Apologies for the noob question.
Sep 7, 2015 at 10:41 AM

When I include the nuget packages into an existing project I get the following error (target win32 desktop)
error LNK2019: unresolved external symbol "long __cdecl Concurrency::details::platform::_getpid(void)"
What do I need to check in the project configuration?
Sep 7, 2015 at 6:38 PM
Spent most of the day on this. I think the problem is that the targets file only configues a project if the configuration is called either "Release" or "Debug" and does not allow for any other configuration names.

Going to extract the lib and include directories from the nuget package and check into our source control instead.
Sep 8, 2015 at 8:21 PM
Yes, that's the behavior we currently have. If you have nonstandard configuration names, then you will need to manually add the libs and headers to your link/include lines.

I'm curious, what do your other configurations do? We've found it more useful to split our configurations into multiple project files instead of having many different configs.
Sep 9, 2015 at 12:02 AM
Our product has different pre-processor directives and libraries for different customers.

We could have separate project file I suppose but isn't this what build configurations are for? Would be nice if casablanca package could detect a release build some other way than by name, or at least wildcard so we could use "Debug - customer name".


Oct 5, 2015 at 4:45 PM
Edited Oct 5, 2015 at 4:49 PM
I am a noob when it comes to NuGet.
I have installed the "cpprestsdk.v120.windesktop.msvcstl.dyn.rt-dyn" package but the compiler still can't find the header files.
Do I really have to manually set the include and lib folders manually? Doesn't it defeat the whole purpose of NuGet?
Could it be because I use VS2012?
Oct 5, 2015 at 7:42 PM
I figure the reason is this (from the release notes): "Please note binaries for Visual Studio 2012 have been removed from the Nuget package."
Oct 5, 2015 at 9:10 PM
Yes, we've removed VS 2012 binaries from the package. I recommend trying out VS 2015 community, which can be downloaded for free from:
Jan 23, 2016 at 1:52 PM
OK, so I have revisited this project and upgraded to VS 2015, am using the 'Release' 'win32' build target and have the following packages installed:
<?xml version="1.0" encoding="utf-8"?>
  <package id="cpprestsdk.v140.windesktop.msvcstl.dyn.rt-dyn" version="2.7.0" targetFramework="native" />
  <package id="openssl.v140.windesktop.msvcstl.dyn.rt-dyn.x86" version="" targetFramework="native" />
  <package id="zlib.v140.windesktop.msvcstl.dyn.rt-dyn" version="" targetFramework="native" />
BUT i still get a linker error
error LNK2019: unresolved external symbol "long __cdecl Concurrency::details::platform::_getpid(void)"
What options do I need to check?
Jan 25, 2016 at 7:11 PM
I'm not sure where this symbol is getting pulled in from; we have no calls to this function in our library as far as I can tell:
PS D:\src\casablanca\Release> findstr /snipl "getpid" *
PS D:\src\casablanca\Release>
Can you bisect your project and figure out where this symbol is coming from? That should give us a better idea of where to look for the lib.