前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >windows有没有内网nuget源

windows有没有内网nuget源

原创
作者头像
Windows技术交流
修改2021-12-30 19:20:39
1.9K0
修改2021-12-30 19:20:39
举报
文章被收录于专栏:Windows技术交流

nuget源的配置文件在%appdata%\NuGet\NuGet.Config

没有内网nuget源,但是有微软中国的,速度可以。

解决国内访问NuGet服务器速度不稳定的问题 ,这里推荐使用NuGet微软官方中国国内镜像

地址:https://nuget.cdn.azure.cn/v3/index.json

NuGet微软官方中国镜像地址: https://nuget.cdn.azure.cn/v3/index.json

官方默认源:

https://api.nuget.org/v3/index.json

博客园:

https://nuget.cnblogs.com/v3/index.json

华为:

https://repo.huaweicloud.com/repository/nuget/v3/index.json

默认的https://api.nuget.org/v3/index.json 如果慢,添加https://nuget.cdn.azure.cn/v3/index.json,如上图

添加方法参考

https://www.cnblogs.com/letnet/p/12221209.html

https://www.grapecity.com/componentone/docs/uwp/online-getting-started/config-nugetpackage.html

打开vs,工具 → NuGet 包管理器 → 程序包管理器设置 → 程序包源 → 添加名称ChinaNuget 、源https://nuget.cdn.azure.cn/v3/index.json

添加好后,按↑箭头挪到第一位后不起作用,重新打开还是默认的那个显示在第一位,并不是添加的这个

如何放到第一位呢?

配置文件是这个位置:%appdata%\NuGet\NuGet.Config

比如我Administrator用户下是C:\Users\Administrator\AppData\Roaming\NuGet\NuGet.Config,把新加的那条记录挪到第一位。这样,虽然打开vs界面看到显示在第一位了,但是用命令行调用的时候并不一定就先调用它,为了确保唯一性,加上新的后,最好删了默认的,只留一个。

后面的拓展一般不需要看

拓展:

https://blog.raikay.com/post/2019/nuget/

https://docs.microsoft.com/zh-cn/nuget/consume-packages/configuring-nuget-behavior

https://docs.microsoft.com/en-us/nuget/consume-packages/configuring-nuget-behavior

https://blackie1019.github.io/2017/04/18/Nuget-Config-for-repositoryPath-and-globalPackagesFolder/

https://www.nuget.org/downloads

https://dist.nuget.org/win-x86-commandline/latest/nuget.exe

NuGet.Config

OS Platform

NuGet.Config

Windows

%appdata%\NuGet\NuGet.Config

Mac/Linux

~/.config/NuGet/NuGet.Config or ~/.nuget/NuGet/NuGet.Config (varies by OS distribution)

Additional Configurations

OS Platform

Additional Configurations

Windows

%appdata%\NuGet\config\*.Config

Mac/Linux

~/.config/NuGet/config/*.config or ~/.nuget/config/*.config

NuGetDefaults.Config Location

OS Platform

NuGetDefaults.Config Location

Windows

Visual Studio 2017 or NuGet 4.x+: %ProgramFiles(x86)%\NuGet\ConfigVisual Studio 2015 and earlier or NuGet 3.x and earlier: %PROGRAMDATA%\NuGet

Mac/Linux

$XDG_DATA_HOME (typically ~/.local/share or /usr/local/share, depending on OS distribution)

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
云服务器
云服务器(Cloud Virtual Machine,CVM)提供安全可靠的弹性计算服务。 您可以实时扩展或缩减计算资源,适应变化的业务需求,并只需按实际使用的资源计费。使用 CVM 可以极大降低您的软硬件采购成本,简化 IT 运维工作。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档