简体   繁体   English

nuget.config和gui设置之间是否存在连接?

[英]Is there a connection between nuget.config and gui settings?

When trying to generate a build, I am getting the following error: 尝试生成构建时,出现以下错误:

1 error(s), 0 warning(s)
$/source control my solution....../Web.sln - 1 error(s), 0 warning(s), View Log File
 D:\Builds\.....zWeb\.nuget\NuGet.targets (93): The underlying connection was closed: An unexpected error occurred on a send.

I am configuring the repository URLs both here: 我在这里都配置存储库URL: 在此处输入图片说明

And in the NuGet.config file: 并在NuGet.config文件中:

在此处输入图片说明

I've tried the following: 我尝试了以下方法:

  1. tried multiple network connections (to rule out firewall issues) 尝试了多个网络连接(以排除防火墙问题)
  2. restarted VS and reinstalled NuGet and all packages 重新启动VS并重新安装NuGet和所有软件包
  3. cleaned, rebuilt 清洗,重建
  4. changed the downloadnuget setting 更改了downloadnuget设置

What am I doing wrong? 我究竟做错了什么? How do I get this to build? 我该如何构建?

In case it is relevant, here's my nuget.targets file. 如果相关,这是我的nuget.targets文件。

Hi try to place file nuget.config in root of your solution like 嗨,尝试将文件nuget.config放在解决方案的根目录中,例如

x:\\SolutionFolder\\nuget.config x:\\SolutionFolder\\Web.sln x:\\ SolutionFolder \\ nuget.config x:\\ SolutionFolder \\ Web.sln

then change nuget.config to have 然后将nuget.config更改为

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <config>
    <add key="repositoryPath" value="packages" />
  </config>
  <packageSources>
    <add key="Your NuGet" value="\\YourServer\Nuget Gallery" />
    <add key="nuget.org" value="https://www.nuget.org/api/v2/" />
  </packageSources>
</configuration>

the repositoryPath is relative to nuget.config file localization create this network share and be sure that your use have access to it repositoryPath相对于nuget.config文件本地化,请创建此网络共享,并确保您的使用有权访问它

<add key="Your NuGet" value="\\YourServer\Nuget Gallery" />

What tfs version and visual studio version you use localy and on the build server ? 您在本地和构建服务器上使用什么tfs版本和Visual Studio版本?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM