microsoft/cppwin32

Regarding that NuGet package

Closed this issue · 3 comments

wjk commented

Is there any way to distribute this code (the code generator, its inputs, and its support headers) other than via a NuGet package? NuGet packages in C++ projects still require the use of packages.config, an ancient technique that breaks CI and annoys the heck out of everyone, because it was fixed for all other project types years ago. Microsoft has repeatedly refused requests to add PackageReference support to vcxproj, to the annoyance of everyone in the Windows C++ developer community. The suggested replacement, vcpkg, is no answer, as it only supports headers and libraries, not code generators or their binary input files. And people who don’t use vcxproj cannot use these libraries at all, since you cannot download the code except via a NuGet package, and you cannot use a NuGet package unless you are building using vcxproj. I don’t mind using NuGet or vcxproj; what I do mind is that our repeated requests for PackageReference, in the forum you explicitly tell us we should post on, are continually ignored.

Bottom line: I don’t care if PackageReference for C++ is something you are interested in or not. But if you are going to be shipping all this wonderful code via NuGet only, that makes it impossible for me to integrate it into my project. There must be some other way you can come up with to allow me to integrate these features into my code. Thank you, and my apologies in advance if I sounded demanding.

Want to leave a vote of support for this request. Nuget has repeatedly failed in my attempts to use it with our mixed (native, c++/cli, c#) project. The latest example is complete failure attempting to target .net 5 from c++/cli the whole process fails. So I'll repeat that Nuget is a disaster with c++ projects.

I'm not a fan of NuGet or vcxproj files either, but there isn't necessarily a good alternative. Why don't you just grab the .exe and include it in your project repo? You can use a custom build step of some kind to invoke cppwinrt.exe and leave it at that.

Agreed. If/when we get a superior package management system in the C++ world, I'll enthusiastically adopt it.