1

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: enter image description here

And in the NuGet.config file:

enter image description here

I've tried the following:

  1. tried multiple network connections (to rule out firewall issues)
  2. restarted VS and reinstalled NuGet and all packages
  3. cleaned, rebuilt
  4. changed the downloadnuget setting

What am I doing wrong? How do I get this to build?

In case it is relevant, here's my nuget.targets file.

Alex Gordon
  • 57,446
  • 287
  • 670
  • 1,062

1 Answers1

1

Hi try to place file nuget.config in root of your solution like

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

then change nuget.config to have

<?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

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

What tfs version and visual studio version you use localy and on the build server ?

Janusz Nowak
  • 2,595
  • 1
  • 17
  • 36