[英]Programmatically Add a packageSource to packageSources in Nuget.Config
[英]Is there a connection between nuget.config and gui settings?
尝试生成构建时,出现以下错误:
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.
并在NuGet.config文件中:
我尝试了以下方法:
我究竟做错了什么? 我该如何构建?
如果相关,这是我的nuget.targets文件。
嗨,尝试将文件nuget.config放在解决方案的根目录中,例如
x:\\ SolutionFolder \\ nuget.config x:\\ SolutionFolder \\ Web.sln
然后将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>
repositoryPath相对于nuget.config文件本地化,请创建此网络共享,并确保您的使用有权访问它
<add key="Your NuGet" value="\\YourServer\Nuget Gallery" />
您在本地和构建服务器上使用什么tfs版本和Visual Studio版本?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.