Creating a nuget package does not work:
c:\development\vcpkg>vcpkg.exe export --nuget bzip2
The following packages are already built and will be exported:
bzip2:x86-windows
Exporting package bzip2:x86-windows...
Exporting package bzip2:x86-windows... done
Creating nuget package...c:\development\vcpkg>
The result is a folder vcpkg-export-20170606-110505, but no .nupkg-file....
Please try running:
vcpkg.exe export --nuget bzip2 --debug
and post the result.
PS C:\development\vcpkg> .vcpkg.exe export --nuget bzip2 --debug
The following packages are already built and will be exported:
bzip2:x86-windows
Exporting package bzip2:x86-windows...
Exporting package bzip2:x86-windows... done
Creating nuget package...[DEBUG] ..\src\vcpkg_Files.cpp(167)
PS C:\development\vcpkg>
Same situation also happened to me (Windows 10, VS 2015 Pro Update 3, NuGet 3.5.0.1938, CMake 3.9.0-rc1):
vcpkg export zlib:x64-windows-static --export nuget --debug
The following packages are already built and will be exported:
zlib:x64-windows-static
Exporting package zlib:x64-windows-static...
Exporting package zlib:x64-windows-static... done
Creating nuget package...
[DEBUG] ..\src\vcpkg_Files.cpp(167)
ZIP export works just fine:
vcpkg export zlib:x64-windows-static --export zip --debug
The following packages are already built and will be exported:
zlib:x64-windows-static
Exporting package zlib:x64-windows-static...
Exporting package zlib:x64-windows-static... done
Creating zip archive...
[DEBUG] _wspawnlpe(cmd.exe /c ""C:\Program Files\CMake\bin\cmake.exe" -E tar "cf" "C:\git\vcpkg\vcpkg-export-20170613-114626.zip" --format=zip -- "C:\git\vcpkg\vcpkg-export-20170613-114626"")
[DEBUG] _wspawnlpe() returned 0
Creating zip archive... done
Zip archive exported at: C:/git/vcpkg/vcpkg-export-20170613-114626.zip
To use the exported libraries in CMake projects use:
"-DCMAKE_TOOLCHAIN_FILE=[...]/scripts/buildsystems/vcpkg.cmake"
[DEBUG] ..\src\commands_export.cpp(390)
BTW; I'm on Windows 10, VS 2017 15.2.26430.13 with NuGet 4.2.0. Also, I have the VS2015 build tools installed.
Performing user-wide integration via vcpkg integrate install fixed the problem for me.
That's an unfortunate requirement for my use case. Is this a bug?
Thanks for reporting this issue and sorry for taking so long about the resolution!
We missed creating a temporary directory during the export, which caused the NuGet export to fail if the directory wasn't previously created by some other command (such as integrate install).
Most helpful comment
Thanks for reporting this issue and sorry for taking so long about the resolution!
We missed creating a temporary directory during the export, which caused the NuGet export to fail if the directory wasn't previously created by some other command (such as
integrate install).