System.InvalidOperationException: Cannot create a package that has no dependencies nor content.
There seems to be an inconsistency with nuget when used on Linux (compare to windows). Here is what I see when creating the NuGet package of GDCM (release branch):
CPackNuGet:Debug: Fallback: CPACK_PACKAGE_DESCRIPTION_SUMMARY ...
CPackNuGet:Debug: CPACK_PACKAGE_DESCRIPTION_SUMMARY=`GDCM - Grassroots DICOM. GDCM is yet another DICOM library.`
CPackNuGet:Debug: CPACK_PACKAGE_DESCRIPTION_SUMMARY: OUTPUT_VAR_NAME->_value=`GDCM - Grassroots DICOM. GDCM is yet another DICOM library.`
CPackNuGet:Debug: _cpack_nuget_variable_fallback: OUTPUT_VAR_NAME=`_value`, NUGET_VAR_NAME=`RELEASE_NOTES`, ARGN: `USE_CDATA`
CPackNuGet:Debug: _cpack_nuget_variable_fallback: OUTPUT_VAR_NAME=`_value`, NUGET_VAR_NAME=`COPYRIGHT`, ARGN: `USE_CDATA`
CPackNuGet:Debug: _cpack_nuget_variable_fallback: OUTPUT_VAR_NAME=`_value`, NUGET_VAR_NAME=`TAGS`, ARGN: `LIST_GLUE`, ` `, `USE_CDATA`
CPackNuGet:Debug: CPACK_NUGET_PACKAGE_TAGS: OUTPUT_VAR_NAME->_value=`dicommedical`
CPackNuGet:Debug: _cpack_nuget_variable_fallback: OUTPUT_VAR_NAME=`_deps`, NUGET_VAR_NAME=`DEPENDENCIES`
CPackNuGet:Debug: Rendering `/home/mathieu/Perso/gdcm-schroot-clang/_CPack_Packages/Linux-x86_64/NuGet/GDCM-3.0.0-Linux-x86_64/CPack.NuGet.nuspec` file...
Attempting to build package from 'CPack.NuGet.nuspec'.
System.InvalidOperationException: Cannot create a package that has no dependencies nor content.
at NuGet.PackageBuilder.Save (System.IO.Stream stream) [0x00062] in <e04d0b7bbb524b59b92c15cbbdf5d03e>:0
at NuGet.Commands.PackCommand.BuildPackage (NuGet.PackageBuilder builder, System.String outputPath) [0x000a0] in <dc8a236afba24badbb185682f8956bec>:0
at NuGet.Commands.PackCommand.BuildFromNuspec (System.String path) [0x0005a] in <dc8a236afba24badbb185682f8956bec>:0
at NuGet.Commands.PackCommand.BuildPackage (System.String path) [0x00018] in <dc8a236afba24badbb185682f8956bec>:0
at NuGet.Commands.PackCommand.ExecuteCommand () [0x000b4] in <dc8a236afba24badbb185682f8956bec>:0
at NuGet.Commands.Command.Execute () [0x000cf] in <dc8a236afba24badbb185682f8956bec>:0
at NuGet.Program.Main (System.String[] args) [0x0019b] in <dc8a236afba24badbb185682f8956bec>:0
CMake Error at /usr/share/cmake-3.13/Modules/Internal/CPack/CPackNuGet.cmake:360 (message):
NuGet package was not generated at
`/home/mathieu/Perso/gdcm-schroot-clang/_CPack_Packages/Linux-x86_64/NuGet/GDCM-3.0.0-Linux-x86_64`!
CPack Error: Error while execution CPackNuGet.cmake
CPack Error: Problem compressing the directory
CPack Error: Error when generating package: GDCM