简体   繁体   English

CMake C++/C++CLI/C# VS 解决方案构建 applocal.ps1 失败

[英]CMake C++/C++CLI/C# VS solution build applocal.ps1 fail

I have a simple CMake C++/C++CLI/C# VS solution that is intended to test interoperability between C++ and C#.我有一个简单的 CMake C++/C++CLI/C# VS 解决方案,旨在测试 C++ 和 C# 之间的互操作性。 I used VS2017 15.9.18 and CMake3.14.0-rc2.我使用了 VS2017 15.9.18 和 CMake3.14.0-rc2。

Everything seems to work fine but while building the C# project, the output log complains :一切似乎都很好,但是在构建 C# 项目时,输出日志抱怨:

C:\vcpkg\scripts\buildsystems\msbuild\applocal.ps1:60
dumpbin : The term 'dumpbin' is not recognized as the name of a cmdlet, function, script file, or operable program.
+     $a = $(dumpbin /DEPENDENTS $targetBinary | ? { $_ -match "^    [^ ...
+            ~~~~~~~
+ CategoryInfo          : ObjectNotFound: (dumpbin:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

Since I have very little knowledge about how vcpkg and CMake work, I don't even know whether if this would cause serious problems in the later stage.由于我对vcpkg和CMake的工作原理知之甚少,我什至不知道这是否会在后期造成严重问题。 According to this issue, it seems like vcpkg does not have dumpbin on the path while building csproj.根据这个问题,在构建 csproj 时,vcpkg 的路径上似乎没有 dumpbin。 What is the exact cause of it and how to solve it?它的确切原因是什么以及如何解决它?

如果您的系统中安装了 VS,请使用Visual Studio 的开发人员命令提示符而不是常规命令提示符,

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

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