【发布时间】:2019-12-30 07:09:57
【问题描述】:
我有一个简单的 CMake C++/C++CLI/C# VS 解决方案,旨在测试 C++ 和 C# 之间的互操作性。我使用了 VS2017 15.9.18 和 CMake3.14.0-rc2。
一切似乎都很好,但是在构建 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
由于我对 vcpkg 和 CMake 的工作原理知之甚少,我什至不知道这是否会在后期造成严重问题。根据this 问题,似乎vcpkg 在构建csproj 时路径上没有dumpbin。它的确切原因是什么以及如何解决它?
【问题讨论】:
-
我可以通过将 dumpbin 替换为 dumpbin.exe 的确切路径来绕过该问题,但我认为应该更改实现,以便 C# 项目可以像 C++ 项目一样正常设置 PATH。
标签: c# visual-studio cmake c++-cli vcpkg