![](/img/trans.png)
[英]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.