1>------ Rebuild All started: Project: librdkafka, Configuration: Debug Win32 ------
1>D:sdk\vs2017\librdkafka-0.11.6\win32\librdkafka.vcxproj(250,5): error : This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is packages\zlib.v141.windesktop.msvcstl.dyn.rt-dyn.1.2.8.8\buildnative\zlib.v141.windesktop.msvcstl.dyn.rt-dyn.targets.
1>Done building project "librdkafka.vcxproj" -- FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
please fix it, thanks
Did you follow the instructions in the error message?
@edenhill
hi, the nuget already download zlib, The error still exists.
How are you performing the NuGet restore, through Visual studio solutions menu or command line?
@edenhill
hi, thanks for your reply. i use the Visual studio solutions menu, can you release a vs2017 .sln file?
The issue is that librdkafka.vcxproj has elements such as:
<Import Project="packages\zlib.$(PlatformToolset).windesktop.msvcstl.dyn.rt-dyn.1.2.8.8\build\native\zlib.$(PlatformToolset).windesktop.msvcstl.dyn.rt-dyn.targets" Condition="Exists('packages\zlib.$(PlatformToolset).windesktop.msvcstl.dyn.rt-dyn.1.2.8.8\build\native\zlib.$(PlatformToolset).windesktop.msvcstl.dyn.rt-dyn.targets')" />
whereas $(PlatformToolset) resolves to v141 and the Nuget packages that are restored in packages.config are v140.
I hacked out the librdkafka.vcxproj and changed zlib.$(PlatformToolset) to zlib.v140
@ElasticCoder
thanks, i have compile success, please close the issue.
The issue is that librdkafka.vcxproj has elements such as:
<Import Project="packages\zlib.$(PlatformToolset).windesktop.msvcstl.dyn.rt-dyn.1.2.8.8\build\native\zlib.$(PlatformToolset).windesktop.msvcstl.dyn.rt-dyn.targets" Condition="Exists('packages\zlib.$(PlatformToolset).windesktop.msvcstl.dyn.rt-dyn.1.2.8.8\build\native\zlib.$(PlatformToolset).windesktop.msvcstl.dyn.rt-dyn.targets')" />whereas $(PlatformToolset) resolves to v141 and the Nuget packages that are restored in packages.config are v140.
I hacked out the librdkafka.vcxproj and changed zlib.$(PlatformToolset) to zlib.v140
@ElasticCoder Hi,thanks for your reply,I modified the librdkafka.vcxproj and changed all "zlib.$(PlatformToolset)" to "zlib.v140",but cause build failed with can't find zlib.h(fatal error C1083: 无法打开包括文件: “zlib.h”: No such file or directory),it seems the project doesn't include zlib header path. I also found the "$(Force-Disable-zlib-v140-windesktop-msvcstl-dyn-rt-dyn)" macro in this project setting was set to true,maybe lead to no zlib was imported.Can I set this macro to false or just remove it manually?

@GavynG Please refer to this article: https://github.com/wjx0912/CppBaseUtils/blob/master/document/librdkafka.md
while using VS2017 with default toolset as v141 , modify the toolset of libkafka.vcxproj to v140 ( VS 2015) , it shud build
Most helpful comment
The issue is that librdkafka.vcxproj has elements such as:
whereas $(PlatformToolset) resolves to v141 and the Nuget packages that are restored in packages.config are v140.
I hacked out the librdkafka.vcxproj and changed zlib.$(PlatformToolset) to zlib.v140