【问题标题】:TFS 2012 How to build a solution with external dll referenceTFS 2012 如何使用外部 dll 参考构建解决方案
【发布时间】:2012-10-30 06:17:41
【问题描述】:

我是 TFS 新手,试图在 TFS 2012 上设置构建。

我的目录结构是

Web
   _Common
       thirdparty
          Telerik
             RadControls
                 2011.3.1305.40
                     Bin40 (All Dll's)
       Utilities.NET4.0
          Utilities(VB Project folder)
             All Files & Folders 
             Utilities.vbproj

   FOO(Folder Name which is also application Name)
      1(Custom Versions 1 per client Bases)
          FOO -All Files & Folders 
          FOO.sln
      2(Custom Versions 2 per client Bases)
          FOO
          FOO.sln
      3(Custom Versions 3 per client Bases)
          FOO -All Files & Folders 
          FOO.sln

以下是自定义版本 1 的解决方案文件

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{E24C65DC-7377-472B-9ABA-F184B08FC61A}") = "FOO", "http://localhost/FOO/1/FOO", "{1B4DD106-50B1-44E1-AB1F-E9F175E995F8}"
    ProjectSection(WebsiteProperties) = preProject
        UseIISExpress = "false"
        TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.0"
        ProjectReferences = "{A6EE09B0-8E91-4D7F-A513-4A45A8EF93A8}|Agility.Web.Utilities.dll;"
        Debug.AspNetCompiler.VirtualPath = "/FOO/1/FOO"
        Debug.AspNetCompiler.PhysicalPath = "FOO\1\FOO\"
        Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\FOO\1\FOO\"
        Debug.AspNetCompiler.Updateable = "true"
        Debug.AspNetCompiler.ForceOverwrite = "true"
        Debug.AspNetCompiler.FixedNames = "false"
        Debug.AspNetCompiler.Debug = "True"
        Release.AspNetCompiler.VirtualPath = "/FOO/1/FOO"
        Release.AspNetCompiler.PhysicalPath = "FOO\1\FOO\"
        Release.AspNetCompiler.TargetPath = "PrecompiledWeb\FOO\1\FOO\"
        Release.AspNetCompiler.Updateable = "true"
        Release.AspNetCompiler.ForceOverwrite = "true"
        Release.AspNetCompiler.FixedNames = "false"
        Release.AspNetCompiler.Debug = "False"
        SlnRelativePath = "FOO\1\"
    EndProjectSection
EndProject
Project("{F184B08F-C81C-45F6-A57F-F184B08FF28F}") = "Utilities", "..\..\_Common\Utilities-.NET4.0\Utilities\Utilities.vbproj", "{A6EE09B0-8E91-4D7F-A513-4A45A8EF93A8}"
EndProject
Global
    GlobalSection(SolutionConfigurationPlatforms) = preSolution
        Debug|Any CPU = Debug|Any CPU
        Release|Any CPU = Release|Any CPU
    EndGlobalSection
    GlobalSection(ProjectConfigurationPlatforms) = postSolution
        {1B4DD106-50B1-44E1-AB1F-E9F175E995F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {1B4DD106-50B1-44E1-AB1F-E9F175E995F8}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {1B4DD106-50B1-44E1-AB1F-E9F175E995F8}.Release|Any CPU.ActiveCfg = Debug|Any CPU
        {1B4DD106-50B1-44E1-AB1F-E9F175E995F8}.Release|Any CPU.Build.0 = Debug|Any CPU
        {A6EE09B0-8E91-4D7F-A513-4A45A8EF93A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {A6EE09B0-8E91-4D7F-A513-4A45A8EF93A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {A6EE09B0-8E91-4D7F-A513-4A45A8EF93A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {A6EE09B0-8E91-4D7F-A513-4A45A8EF93A8}.Release|Any CPU.Build.0 = Release|Any CPU
    EndGlobalSection
    GlobalSection(SolutionProperties) = preSolution
        HideSolutionNode = FALSE
    EndGlobalSection
EndGlobal

注意事项:

  • 本地计算机上的 IIS 设置
    • FOO = Web 应用程序
    • 实用程序 = 虚拟文件夹

我如何做到这一点:FOO 引用了 Bin40 下的 dll

我已尝试实现此目的,但无法使用默认模板运行它。

感谢您的帮助。

解决方案:

我更新了构建定义。

在 Workspace 中,我映射了工作文件夹

 $/Web/Main/_Common: $(SourceDir)\_Common
 $/Web/Main/_Common/thirdparty/Telerik/RadControls/2011.3.1305.40/Bin40:$(SourceDir)\FOO\1\FOO\Bin
 $/Web/Main/FOO/6: $(SourceDir)\FOO\6

【问题讨论】:

    标签: tfs tfsbuild


    【解决方案1】:

    确保文件引用使用项目文件中的相对路径。

    另外,请确保您的构建工作区映射正在从您的示例下载整个 Web 根目录。

    如果这不起作用,我们需要查看您遇到的错误,以及您如何引用相关 DLL。

    【讨论】:

    • 我已经用解决方案更新了帖子,但我不确定这是否是引用第二部分的正确方法,即telerik dll
    • 你能不能在你的工作区映射中只有一个条目:$/Web/MAIN -> $(SourceDir)
    猜你喜欢
    • 2013-07-16
    • 1970-01-01
    • 2023-03-10
    • 2017-12-30
    • 2012-04-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-06-16
    相关资源
    最近更新 更多