简体   繁体   English

Visual Studio 2015社区-> cpprestsdk nuget包

[英]Visual Studio 2015 Community -> cpprestsdk nuget package

It's my first time. 这是我第一次 I have a problem with Visual Studio 2015. I want to use the library cpp REST SDK . 我在Visual Studio 2015中遇到问题。我想使用库cpp REST SDK My problem is: 我的问题是:

When I install the package using the NuGet Package Manager in Visual Studio, everything is ok and the package is installed. 当我在Visual Studio中使用NuGet软件包管理器安装软件包时,一切正常,并且已安装软件包。 But, when, in my code, I want to include : 但是,当我想要在代码中包含以下内容时:

#include <cpprest\http_client.h>

Intellisense tell me that it can not open the source file. Intellisense告诉我它无法打开源文件。

My Conclusion is: My package is installed but I can't use the library... 我的结论是:我的软件包已安装,但无法使用该库...

If you have installed it using the Nuget Package Manager, then wait for some time to get it fully installed. 如果您使用Nuget软件包管理器安装了它,请等待一段时间以完全安装它。

The last line after the full installation should look like this: 完整安装后的最后一行应如下所示:

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 ==========

After that the files will be included automatically. 之后,文件将自动包含在内。 If you are still facing this issue, you can manually add the include path in Project -> Properties -> Configuration Properties -> C++ -> Additional Include Directories 如果仍然遇到此问题,则可以在项目->属性->配置属性-> C ++->其他包含目录中手动添加包含路径。

The path will look like: 路径如下所示:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM