Visual Studio 2015 Community -> cpprestsdk nuget 包

Visual Studio 2015 Community -> cpprestsdk nuget package

本文关键字:cpprestsdk nuget gt Studio 2015 Community Visual      更新时间:2023-10-16

这是我第一次。我对Visual Studio 2015有问题。我想使用库cpp REST SDK。我的问题是:

当我在Visual Studio中使用NuGet软件包管理器安装软件包时,一切正常,软件包就安装好了。但是,当,在我的代码中,我想包括:

#include <cppresthttp_client.h>

Intellisense告诉我它无法打开源文件。

我的结论是:我的程序包已安装,但我无法使用库。。。

如果您使用Nuget Package Manager安装了它,请等待一段时间以使其完全安装。

完整安装后的最后一行应该是这样的:

End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.PackageManagement.UI.UIActionEngine.<PerformActionImplAsync>d__6.MoveNext()
========== Finished ==========

之后,文件将自动包含在内。如果您仍然面临此问题,您可以在项目->属性->配置属性->C++->其他包含目录中手动添加包含路径

路径看起来像:

C: \Users\ComputerName\Documents\Visual Studio 2015\Projects\Project\packages\cpprestsdk.v140.windesktop.msvcstl.dyn.rt dyn.2.7.0\build\native\include