Sharpmake icon indicating copy to clipboard operation
Sharpmake copied to clipboard

NuGet for CPP projects

Open Cheaterdev opened this issue 4 years ago • 8 comments

Hello! Will be there support for NuGet references for C++ projects? Want to reference D3D12 Agility SDK.

Cheaterdev avatar Aug 02 '21 09:08 Cheaterdev

Heya! There's an open PR to add support for this #81, I need to find some time to resurrect it... Note that it's only for MSBuild

belkiss avatar Aug 03 '21 08:08 belkiss

Hey, Has there been any update on this or is there a rough ETA? I would also need C++ nuget support for the very same reason.

domme avatar Jan 22 '22 12:01 domme

Heya! No progress on that front, sorry :(

belkiss avatar Jan 25 '22 08:01 belkiss

@belkiss You can download Agility SDK via bat command alongside with generating project files via Sharpmake. Passing downloaded library through sharpmake config is quite easy. You can refer to my Spectrum project where I did this.

Cheaterdev avatar Jan 25 '22 14:01 Cheaterdev

I've updated the integration and there's a new PR up #173

Note: msbuild doesn't auto restore c++ nuget packages. building through devenv does otherwise you need to invoke nuget seperately.

kudaba avatar Feb 16 '22 07:02 kudaba

Note: msbuild doesn't auto restore c++ nuget packages. building through devenv does otherwise you need to invoke nuget seperately.

That's not true, msbuild can restore nuget packages, like we do in the batch file here: https://github.com/ubisoft/Sharpmake/blob/a0c127eac3c91151c5decdcb02e6fc80d76a5285/CompileSharpmake.bat#L72

belkiss avatar Feb 16 '22 08:02 belkiss

https://github.com/NuGet/Home/issues/7386 This is using the packages.config method which isn't supported by msbuild. I can't really remember if that's the only way to do it for c++ or if newer versions allow references directly in the vcxproj.

kudaba avatar Feb 16 '22 17:02 kudaba