将自定义包源添加到 Visual Studio Code [英] Add custom package source to Visual Studio Code
本文介绍了将自定义包源添加到 Visual Studio Code的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有谁知道如何将自定义包源添加到 Visual Studio 代码?
Does anybody know how to add custom package source to Visual Studio Code?
例如我想添加 https://www.myget.org/F/aspnet-contrib/api/v3/index.json 作为包源并通过project.json驱动这些包.
E.g. I'd like to add https://www.myget.org/F/aspnet-contrib/api/v3/index.json as a package source and drive these packages through project.json.
推荐答案
补充一下,在项目中添加一个 nuget.config
为项目解决.添加到根就可以了.配置可能如下所示:
To add to the answer, adding a nuget.config
in the project solves it for the project. Adding to the root is ok. The config could look like this:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="MyGet" value="https://www.myget.org/F/aspnet-contrib/api/v3/index.json" />
</packageSources>
</configuration>
这篇关于将自定义包源添加到 Visual Studio Code的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文