<bdo id='i1rZ2'></bdo><ul id='i1rZ2'></ul>

    <i id='i1rZ2'><tr id='i1rZ2'><dt id='i1rZ2'><q id='i1rZ2'><span id='i1rZ2'><b id='i1rZ2'><form id='i1rZ2'><ins id='i1rZ2'></ins><ul id='i1rZ2'></ul><sub id='i1rZ2'></sub></form><legend id='i1rZ2'></legend><bdo id='i1rZ2'><pre id='i1rZ2'><center id='i1rZ2'></center></pre></bdo></b><th id='i1rZ2'></th></span></q></dt></tr></i><div id='i1rZ2'><tfoot id='i1rZ2'></tfoot><dl id='i1rZ2'><fieldset id='i1rZ2'></fieldset></dl></div>

  1. <legend id='i1rZ2'><style id='i1rZ2'><dir id='i1rZ2'><q id='i1rZ2'></q></dir></style></legend>

    1. <tfoot id='i1rZ2'></tfoot>

      <small id='i1rZ2'></small><noframes id='i1rZ2'>

      如何在 TFS 构建中获得 nuget 还原

      时间:2023-05-20

      <small id='NY1p5'></small><noframes id='NY1p5'>

          <bdo id='NY1p5'></bdo><ul id='NY1p5'></ul>
          • <i id='NY1p5'><tr id='NY1p5'><dt id='NY1p5'><q id='NY1p5'><span id='NY1p5'><b id='NY1p5'><form id='NY1p5'><ins id='NY1p5'></ins><ul id='NY1p5'></ul><sub id='NY1p5'></sub></form><legend id='NY1p5'></legend><bdo id='NY1p5'><pre id='NY1p5'><center id='NY1p5'></center></pre></bdo></b><th id='NY1p5'></th></span></q></dt></tr></i><div id='NY1p5'><tfoot id='NY1p5'></tfoot><dl id='NY1p5'><fieldset id='NY1p5'></fieldset></dl></div>
          • <tfoot id='NY1p5'></tfoot>
                <tbody id='NY1p5'></tbody>

                <legend id='NY1p5'><style id='NY1p5'><dir id='NY1p5'><q id='NY1p5'></q></dir></style></legend>
                本文介绍了如何在 TFS 构建中获得 nuget 还原的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                限时送ChatGPT账号..

                我无法让它工作 TFS 构建.这是nuget恢复问题.Nuget 不恢复参考 dll 文件.

                I can't make it work TFS build. It is nuget restore issue. Nuget is not restoring reference dll files.

                这是我的构建配置.请告诉我如何使它起作用.

                Here is belwo my build configuration. Please advise me how I can make this works.

                推荐答案

                根据 Nuget 网站上的这篇博文 您可以使用您提到的命令行,但它必须是使用 Build.proj 文件的自定义目标的一部分.

                As per this blog post on Nuget's website you can use the command line you mentioned, but it has to be part of a custom target using a Build.proj file.

                您需要添加一个 Build.proj 并将其作为内容:

                You need to add a Build.proj and put this as the contents:

                <?xml version="1.0" encoding="utf-8"?>
                <Project ToolsVersion="4.0"
                         DefaultTargets="Build"
                         xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
                
                  <PropertyGroup>
                    <OutDir Condition=" '$(OutDir)'=='' ">$(MSBuildThisFileDirectory)bin</OutDir>
                    <Configuration Condition=" '$(Configuration)'=='' ">Release</Configuration>
                    <SourceHome Condition=" '$(SourceHome)'=='' ">$(MSBuildThisFileDirectory)src</SourceHome>
                    <ToolsHome Condition=" '$(ToolsHome)'=='' ">$(MSBuildThisFileDirectory)tools</ToolsHome>
                  </PropertyGroup>
                
                  <ItemGroup>
                    <Solution Include="$(SourceHome)*.sln">
                      <AdditionalProperties>OutDir=$(OutDir);Configuration=$(Configuration)</AdditionalProperties>
                    </Solution>
                  </ItemGroup>
                
                  <Target Name="RestorePackages">
                    <Exec Command="&quot;$(ToolsHome)NuGetNuGet.exe&quot; restore &quot;%(Solution.Identity)&quot;" />
                  </Target>
                
                  <Target Name="Clean">
                    <MSBuild Targets="Clean"
                             Projects="@(Solution)" />
                  </Target>
                
                  <Target Name="Build" DependsOnTargets="RestorePackages">
                    <MSBuild Targets="Build"
                             Projects="@(Solution)" />
                  </Target>
                
                  <Target Name="Rebuild" DependsOnTargets="RestorePackages">
                    <MSBuild Targets="Rebuild"
                             Projects="@(Solution)" />
                  </Target>
                
                </Project>
                

                或者,您可以从 自定义预构建脚本.

                或者,自定义 XAML 模板并将 Foreach 循环添加到调用:

                Or, customise the XAML template and add a Foreach loop to invoke:

                nuget.exe restore path	osolution.sln
                

                在构建定义中的每个解决方案上.

                on each solution in the build definition.

                这篇关于如何在 TFS 构建中获得 nuget 还原的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:NUnit“无法加载文件或程序集'MyTestProject' 下一篇:CI服务器的比较?

                相关文章

                  <bdo id='Dgjec'></bdo><ul id='Dgjec'></ul>

                  <small id='Dgjec'></small><noframes id='Dgjec'>

                1. <i id='Dgjec'><tr id='Dgjec'><dt id='Dgjec'><q id='Dgjec'><span id='Dgjec'><b id='Dgjec'><form id='Dgjec'><ins id='Dgjec'></ins><ul id='Dgjec'></ul><sub id='Dgjec'></sub></form><legend id='Dgjec'></legend><bdo id='Dgjec'><pre id='Dgjec'><center id='Dgjec'></center></pre></bdo></b><th id='Dgjec'></th></span></q></dt></tr></i><div id='Dgjec'><tfoot id='Dgjec'></tfoot><dl id='Dgjec'><fieldset id='Dgjec'></fieldset></dl></div>
                  <tfoot id='Dgjec'></tfoot>

                  <legend id='Dgjec'><style id='Dgjec'><dir id='Dgjec'><q id='Dgjec'></q></dir></style></legend>