【问题标题】:TFS Build not finding DllsTFS Build 找不到 Dll
【发布时间】:2017-05-24 18:17:27
【问题描述】:

我是 TFS 构建的新手。我正在使用 TFS Visual Studio 模板。

我的应用使用 dev express dll。 我所有的 devexpress dll 都被检入公共文件夹:

当我运行构建时,构建代理失败,无法找到 dev express 组件。它在以下位置寻找 dll:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.1

2017-05-23T19:15:04.0271172Z                  For SearchPath "{TargetFrameworkDirectory}".
2017-05-23T19:15:04.0271172Z                  Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\DevExpress.Charts.v15.2.Core.winmd", but it didn't exist.
2017-05-23T19:15:04.0271172Z                  Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\DevExpress.Charts.v15.2.Core.dll", but it didn't exist.
2017-05-23T19:15:04.0271172Z                  Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\DevExpress.Charts.v15.2.Core.exe", but it didn't exist.
2017-05-23T19:15:04.0427439Z                  Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\Facades\DevExpress.Charts.v15.2.Core.winmd", but it didn't exist.
2017-05-23T19:15:04.0427439Z                  Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\Facades\DevExpress.Charts.v15.2.Core.dll", but it didn't exist.
2017-05-23T19:15:04.0427439Z                  Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\Facades\DevExpress.Charts.v15.2.Core.exe", but it didn't exist.

2017-05-23T19:15:03.7771166Z      7>ResolveAssemblyReferences:
2017-05-23T19:15:04.0271172Z          Primary reference "DevExpress.Charts.v15.2.Core, Version=15.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a".
2017-05-23T19:15:04.0271172Z ##[warning]C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5): Warning MSB3245: Could not resolve this reference. Could not locate the assembly "DevExpress.Charts.v15.2.Core, Version=15.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
2017-05-23T19:15:04.0271172Z      7>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "DevExpress.Charts.v15.2.Core, Version=15.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [E:\agent\CentralCompliance\_work\9\s\CentralCompliance\CentralCompliance.csproj]
2017-05-23T19:15:04.0271172Z                  For SearchPath "{CandidateAssemblyFiles}".

知道为什么它不查看公共文件夹吗?我究竟做错了什么? 感谢帮助。

【问题讨论】:

  • 您的项目如何引用这些 dll?这些文件的项目的<Reference> 项的<HintPath> 值包含什么?
  • 您是使用 TFVC 还是 Git 进行源代码控制?
  • 我使用 TFS 作为源代码控制。

标签: tfs msbuild


【解决方案1】:

由于 VS 设计器的特殊性,所有设计器程序集都应安装在 GAC 中。猜猜这就是它在以下位置寻找 dll 的原因: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.1 而不是您的公用文件夹。如果没有安装 DevExpress,就不可能将这些程序集部署到计算机上。构建代理也是如此。在 DevExpress 安装期间将放入 GAC 的设计程序集。

除了避免许可证问题外,您还需要在构建代理上安装 DevExpress。

我们正在验证和整合许可证信息 “构建应用程序”阶段。所以,有必要让我们的 在机器上安装和注册的组件。否则, 可能会出现试用窗口。您可以组织构建服务器并构建 那里的项目。 构建服务器应该有组件 也安装了,但是,您可以确定您不会获得 许可问题。

更多详情请看以下链接:

【讨论】:

  • Patrick,感谢您的详细描述。我在构建服务器上安装了 devexpress,现在一切正常。
【解决方案2】:

您必须在构建代理上安装 DevExpress。构建过程通过使用本地 DevExpress 安装来恢复依赖关系。

【讨论】:

    猜你喜欢
    • 2013-11-27
    • 2012-07-30
    • 2018-09-06
    • 2015-09-23
    • 2015-11-11
    • 1970-01-01
    • 2011-07-10
    • 2023-03-09
    • 1970-01-01
    相关资源
    最近更新 更多