在project.json .Net Core中本地管理nuget [英] Manage nuget locally in project.json .Net Core
问题描述
我不想依赖nuget服务来下载依赖项。我想在.Net Core应用程序本地下载和使用nuget软件包。
方法与以前相同:打开 NuGet.config 文件,然后添加您的本地供稿(带有pacakages的本地文件夹的路径。请参见托管您自己的Nuget feed doc):
<?xml version = 1.0 encoding = utf-8?>
< configuration>
< packageSources>
< add key = AspNetVNext value = https://www.myget.org/F/aspnetcidev/api/v3/index.json />
...
<添加key = LocalFeed value =<本地文件夹的路径> />
< / packageSources>
您可以修改默认的NuGet。配置文件
NuGet配置文件的默认位置是%APPDATA%\NuGet\NuGet.Config(DOS)或$ ENV:
或在解决方案的根文件夹中创建自己的文件。
或在解决方案的根文件夹中创建自己的文件。
p>I don't want to rely on nuget service for downloading dependency. I want to download and use nuget packages locally in my .Net Core app. Is it possible?
Approach is the same as was before: open your NuGet.config file and add your local feed (path to local folder with pacakages. See Hosting your own Nuget feed doc):
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="AspNetVNext" value="https://www.myget.org/F/aspnetcidev/api/v3/index.json" />
...
<add key="LocalFeed" value="<path to your local folder>" />
</packageSources>
You can modify default NuGet.config file
The default location for NuGet's configuration file is %APPDATA%\NuGet\NuGet.Config (DOS) or $ENV:APPDATA\NuGet\NuGet.Config (PowerShell).
or create your own file in root folder of your solution.
这篇关于在project.json .Net Core中本地管理nuget的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!