"The license for Visual Studio has expired." 当使用 Visual Studio 从 TFS build 编译时
"The license for Visual Studio has expired." when compiling with Visual Studio from TFS build
我需要在我们的构建服务器上构建 SSIS 项目 (.dtproj)。 msbuild 不支持它们,所以我需要使用 Visual Studio 来完成。 Stack Overflow 的智慧表明我不需要新的 VS 许可证来执行此操作 (Is a separate Visual Studio license required for a build machine?)。我已经以我自己的身份登录到构建服务器,并注册了 Visual Studio。但我不知道如何告诉构建代理使用我的 Visual Studio 许可证。使用 TFS2015、vNext 构建代理(不是 XAML)。
我打电话
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.com blah.sln /build Release
来自 TFS 构建。
2017-05-02T21:56:08.6745925Z Microsoft Visual Studio 2015 Version 14.0.25420.1.
2017-05-02T21:56:08.6745925Z Copyright (C) Microsoft Corp. All rights reserved.
2017-05-02T21:56:08.6745925Z The license for Visual Studio has expired.
2017-05-02T21:56:09.2986224Z The evaluation period for this product has ended.
想通了。如果我注册 Visual Studio 为我,那么我就可以构建。如果我转到 MSDN 站点并获取产品密钥 (https://msdn.microsoft.com/en-us/subscriptions/keys/),然后在 Visual Studio 中转到 "Unlock with Product Key" 并输入该密钥,现在任何人(包括 TFS 构建代理)都可以构建.
更新
我们遇到了类似的问题。由于我们正在编译 SSIS 项目,因此我们使用 devenv.com
的情况完全相同。
唯一不同的是,我们使用 Visual Studio Team System Agents 在线提供 TFS 进行构建,并且我们无法使用我们的 MSDN 许可检索密钥。相反,我们会收到一个弹出对话框,说明 A product key is not offered with this edition of Visual Studio. To unlock the product, you must sign in using the login associated with your active Visual Studio subscription. By signing in, your IDE settings will sync across devices, and you can connect to online developer services.
我们必须删除 NT AUTHORITY\NETWORK SERVICE
帐户下的代理程序,然后在我们可以用该帐户登录的帐户下重新安装它,打开 Visual Studio,并让我们中的一个 sign-in
在 Visual Studio 客户端用户中他们的凭据。
这解决了问题,现在我们的构建正在服务帐户下完成 运行。
步骤
- 创建本地帐户或使用域帐户,例如
domain\tfsservice
- 使用该帐户登录构建机器,启动
Visual Studio,
sign-in
在 Visual Studio 客户端使用
拥有有效许可证的人的凭据
- 重新配置代理
第一次通过管理员
config.cmd remove
将其删除
命令提示符
- 然后第 2 次使用
config.cmd
重新配置代理
使用本地或域帐户而不是 NT
AUTHORITY\NETWORK SERVICE
帐户
从@Holistic Developer 的评论中复制
他的建议对我有用。
Unfortunately, if your Visual Studio license is obtained through the Microsoft Partner Network then product keys are not provided; it can only be done by signing in to your Visual Studio subscription account.
所以我做了什么,我只是打开了安装在我们的构建服务器上的 Visual Studio 2019 并登录,错误消失了。
然而,当简单地登录到我们客户的机器(不同的 DevOps 和代理等等)时,它没有用,所以 YMMW。
我需要在我们的构建服务器上构建 SSIS 项目 (.dtproj)。 msbuild 不支持它们,所以我需要使用 Visual Studio 来完成。 Stack Overflow 的智慧表明我不需要新的 VS 许可证来执行此操作 (Is a separate Visual Studio license required for a build machine?)。我已经以我自己的身份登录到构建服务器,并注册了 Visual Studio。但我不知道如何告诉构建代理使用我的 Visual Studio 许可证。使用 TFS2015、vNext 构建代理(不是 XAML)。
我打电话
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.com blah.sln /build Release
来自 TFS 构建。
2017-05-02T21:56:08.6745925Z Microsoft Visual Studio 2015 Version 14.0.25420.1.
2017-05-02T21:56:08.6745925Z Copyright (C) Microsoft Corp. All rights reserved.
2017-05-02T21:56:08.6745925Z The license for Visual Studio has expired.
2017-05-02T21:56:09.2986224Z The evaluation period for this product has ended.
想通了。如果我注册 Visual Studio 为我,那么我就可以构建。如果我转到 MSDN 站点并获取产品密钥 (https://msdn.microsoft.com/en-us/subscriptions/keys/),然后在 Visual Studio 中转到 "Unlock with Product Key" 并输入该密钥,现在任何人(包括 TFS 构建代理)都可以构建.
更新
我们遇到了类似的问题。由于我们正在编译 SSIS 项目,因此我们使用 devenv.com
的情况完全相同。
唯一不同的是,我们使用 Visual Studio Team System Agents 在线提供 TFS 进行构建,并且我们无法使用我们的 MSDN 许可检索密钥。相反,我们会收到一个弹出对话框,说明 A product key is not offered with this edition of Visual Studio. To unlock the product, you must sign in using the login associated with your active Visual Studio subscription. By signing in, your IDE settings will sync across devices, and you can connect to online developer services.
我们必须删除 NT AUTHORITY\NETWORK SERVICE
帐户下的代理程序,然后在我们可以用该帐户登录的帐户下重新安装它,打开 Visual Studio,并让我们中的一个 sign-in
在 Visual Studio 客户端用户中他们的凭据。
这解决了问题,现在我们的构建正在服务帐户下完成 运行。
步骤
- 创建本地帐户或使用域帐户,例如
domain\tfsservice
- 使用该帐户登录构建机器,启动
Visual Studio,
sign-in
在 Visual Studio 客户端使用 拥有有效许可证的人的凭据 - 重新配置代理
第一次通过管理员
config.cmd remove
将其删除 命令提示符 - 然后第 2 次使用
config.cmd
重新配置代理 使用本地或域帐户而不是NT AUTHORITY\NETWORK SERVICE
帐户
从@Holistic Developer 的评论中复制
他的建议对我有用。
Unfortunately, if your Visual Studio license is obtained through the Microsoft Partner Network then product keys are not provided; it can only be done by signing in to your Visual Studio subscription account.
所以我做了什么,我只是打开了安装在我们的构建服务器上的 Visual Studio 2019 并登录,错误消失了。
然而,当简单地登录到我们客户的机器(不同的 DevOps 和代理等等)时,它没有用,所以 YMMW。