栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

如何在Ubuntu 14.04上使用dotnet CLI注册新的NuGet软件包源?

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

如何在Ubuntu 14.04上使用dotnet CLI注册新的NuGet软件包源?

毕竟,我很快发现了我遗漏的2个问题:

  1. 我曾经
    sudo -i
    以root用户身份运行以尝试解决问题,结果是我在 home文件夹中设置的NuGet配置没有被使用。
  2. 回到我自己的登录,然后出现错误:
    error: Unable to load the service index for source https://theluggage-agct.gray.net/artifactory/api/nuget/nuget-institutional-development-local.

    error: The content at 'https://theluggage-agct.gray.net/artifactory/api/nuget/nuget-institutional-development-local’ is not a valid JSON object.
    error: Unexpected character encountered while parsing value: <. Path ‘’, line 0, position 0.

原来,我们的Artifactory NuGet回购返回的XML符合NuGet
v2。我更改了配置文件,将存储库设置为v2,现在可以正常工作了。因此,从上方在以下位置编辑文件

home<user>.nugetNuGetNuGet.Config

添加新的回购URL,并正确获得版本设置:

<?xml version="1.0" encoding="utf-8"?><configuration>  <packageSources>    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />    <add key="Artifactory-DEV" value="https://theluggage-agct.gray.net/artifactory/api/nuget/nuget-institutional-development-local" protocolVersion="2"/>  </packageSources></configuration>


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/409336.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号