我使用 Visual Studio Enterprise 2015 Update 1 创建了一个共享库:
文件 > 新建项目 > 模板 > Visual C++ > 跨平台 > 共享库(Android、iOS)
我默认得到以下项目结构:
android 项目构建成功。但是,当我尝试编译 iOS 项目(屏幕截图中突出显示的项目)时,问题出现了。
由于需要构建代理,我使用 npm
在 Mac 上安装了它和 vcremote
(如此处解释:https://msdn.microsoft.com/library/mt147405.aspx)。
我通过进入 Tools > Options > Cross Platform > C++ > iOS > Pairing
成功地将 Visual Studio 与 Mac 配对。
但我仍然收到以下错误:
"Build agent request has failed, this client is not compatible with the paired build agent. Client version "1.3.0", build agent version "2.3.0". Supported build agent versions are: "2.0.0 - 2.2.0". Please update vcremote with "npm update vcremote", on the Mac."
在 Mac 终端上,我收到类似的错误消息:
"Visual Studio is incompatible with the current version of this build agent. Please update vcremote using npm."
我确实运行了 npm update vcremote
命令,它现在是最新的,但错误仍然出现。此外,关于客户端版本,构建代理版本似乎过高。
你们有什么建议?
最佳答案
问题是 vcremote-lib
的版本这太高了 (2.3.0)。我试图只降级这个包,但没有用,所以我降级了整个 vcremote
它终于奏效了。以下是我为解决问题而采取的步骤:
卸载vcremote
:
(关于 npm
“卸载”命令的文档:https://docs.npmjs.com/cli/uninstall)
sudo npm -g uninstall vcremote --save
sudo npm -g uninstall vcremote-lib --save
检查可用的版本:
(关于 npm
“版本”命令的文档:https://docs.npmjs.com/cli/version)
如果您在安装软件包时没有指定版本号,则默认选择最新版本。要检查特定包的可用版本(这里我们讨论的是 vcremote
包) 运行以下命令:
npm view vcremote versions
重新安装特定版本的vcremote
:
(关于 npm
“安装”命令的文档:https://docs.npmjs.com/cli/install)
我不想要最后一个 (1.0.8),所以我在运行以下命令时指定了一个先前的版本 (1.0.6):
sudo npm install -g --unsafe-perm vcremote@1.0.6
...而不是使用 documentation 中提供的以下命令:
sudo npm install -g --unsafe-perm vcremote
最后:
现在它工作正常,因为 vcremote 1.0.6 使用 vcremote-lib 2.0.0(而 vcremote 1.0.8 使用 vcremote-lib 2.3.0).
关于c++ - 用VS2015编译共享库 : "this client is not compatible with the paired build agent",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36280149/