我以前从未在 Visual C++ 项目中使用过 nuget。但现在我在How to use the C Rest SDK NuGet package
那里得到了帮助。
我已经启动了 c++ 控制台项目,点击"Manage NuGetPackages for solution...
“:
并得到了包裹清单。看起来所有项目都适用于 .NET。
如果我cpprestsdk
根据手动系统在搜索框中输入任何内容。我可以将 NuGet 用于 Visual C++ 项目以及为什么缺少列表。如何安装 cpp REST SDK?
升级版:
是的,错误地是 C# 项目,但与 C++ 项目图片是一样的。控制台也没有帮助:
Type 'get-help NuGet' to see all available NuGet commands.
PM> Install-Package cpprestsdk -Version 2.9.1.1
Attempting to gather dependency information for package 'cpprestsdk.2.9.1.1' with respect to project 'ConsoleApplication1', targeting 'native,Version=v0.0'
Install-Package : Package 'cpprestsdk,2.9.1.1' is not found in the following primary source(s): 'C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\'. Please verify all your online package sources are available (OR) package id, version are specified correctly.
At line:1 char:1
+ Install-Package cpprestsdk -Version 2.9.1.1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
PM> Install-Package cpprestsdk
Install-Package : Unable to find package 'cpprestsdk'
At line:1 char:1
+ Install-Package cpprestsdk
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
PM>