Forcing restore from package sources
By default, NuGet restore operations use packages from the global-packages and http-cache folders, which are described on Managing the global packages and cache folders.
To avoid using the global-packages folder, do one of the following:
- Clear the folder using
nuget locals global-packages -clearordotnet nuget locals global-packages --clear - Temporarily change the location of the global-packages folder before the restore operation using one of the following methods:
- Set the NUGET_PACKAGES environment variable to a different folder.
- Create a
NuGet.Configfile that setsglobalPackagesFolder(if using PackageReference) orrepositoryPath(if usingpackages.config) to a different folder (see configuration settings - MSBuild only: specify a different folder with the
RestorePackagesPathproperty.
To avoid using the cache for HTTP sources, do one of the following:
- Use the
-NoCacheoption withnuget restoreor the--no-cacheoption withdotnet restore. These options do not affect restore operations through the Visual Studio Package Manager UI or Console. - Clear the cache using
nuget locals http-cache -clearordotnet nuget locals http-cache --clear. - Temporarily set of the NUGET_HTTP_CACHE_PATH environment variable to a different folder.
执行这2个命令
nuget locals global-packages -clear
Use the -NoCache option with nuget restore
Example
nuget sources add -Name "rdc" -Source http://172.31.212.138:8089/Nuget
nuget locals global-packages -clear
nuget restore LISA.CMSWeb.sln -NoCache
pause
Forcing restore from package sources的更多相关文章
- .net core 2.0 报错:error NU1102: Unable to find package 。。。
这种是nuget无法还原的问题.解决问题的方法: 在项目文件所在的目录下创建文件:NuGet.Config 里面内容: "?> <configuration> <pa ...
- .net core 2.0 报错:error NU1102: Unable to find package ...
原文地址:传送门 这种是nuget无法还原的问题.解决问题的方法: 在项目文件所在的目录下创建文件:NuGet.Config 里面内容: <?xml version="1.0" ...
- 你需要知道的包管理器(Package Manager)
最近我花了一点时间关注了在不同系统之中所用到的包管理器(Package Manager) .最开始的时候,我是在使用Linux操作系统时,对这种工具以及它背后的想法深深迷恋住了:这真是自由的软件世界. ...
- windows系统下的第一个console程序
窗口+r 键,输入cmd,打开一个命令行窗口 切换到你的目标目录 输入 dotnet new dotnet会自动帮你创建3个文件. NuGet.Config文件主要定义了NuGet获取nupkg包时的 ...
- Cloudinsight Agent install script
#!/bin/bash # Cloudinsight Agent install script. set -e logfile="ci-agent-install.log" gis ...
- NET Core 1.0 RC2
NET Core 1.0 RC2 历险之旅 文章背景:对于.NET Core大家应该并不陌生, 从它被 宣布 到现在已经有1-2年的时间了,其比较重要的一个版本1.0 RC2 也即将发布..Net C ...
- .netcore入门
开发环境:windows 编辑器: Visual Studio Code 环境安装: .Net Core 1.1 SDK https://www.microsoft.com/net/co ...
- 06 Frequently Asked Questions (FAQ) 常见问题解答 (常见问题)
Frequently Asked Questions (FAQ) Origins 起源 What is the purpose of the project? What is the history ...
- 在VS中自动生成NuGet包以及搭建自己的或单位内部的NuGet服务器
关于NuGet的介绍已经很多,可以参考下面的: NuGet学习笔记(1)--初识NuGet及快速安装使用 http://kb.cnblogs.com/page/143190/ NuGet学习笔记(2) ...
随机推荐
- Python 进程(process)
1. 进程 1.1 进程的创建 fork 正在运行着的代码,就称为进程 # 示例: import os # 注意: fork 函数,只在 Unix/Linux/Mac 上运行, windows 不可以 ...
- 剑指Offer——二叉搜索树的后序遍历序列
题目描述: 输入一个整数数组,判断该数组是不是某二叉搜索树的后序遍历的结果.如果是则输出Yes,否则输出No.假设输入的数组的任意两个数字都互不相同. 分析: 二叉查找树(Binary Search ...
- LInux进程虚拟地址空间的管理
2017-04-07 脱离物理内存的管理,今天咱们来聊聊进程虚拟内存的管理.因为进程直接分配和使用的都是虚拟内存,而物理内存则是有系统“按需”分配给进程,在进程看来,只知道虚拟内存的存在! 前言: 关 ...
- 金融量化ushare模块
一.介绍 Tushare是一个免费.开源的python财经数据接口包.主要实现对股票等金融数据从数据采集.清洗加工 到 数据存储的过程,能够为金融分析人员提供快速.整洁.和多样的便于分析的数据,为他们 ...
- 使用Django和Python创建Json response
版权声明:本文为博主原创文章,欢迎转载. https://blog.csdn.net/fengyu09/article/details/30785101 使用jquery的.post提交,并期望得到多 ...
- HttpServletRequest获取请求参数中所有的信息
/** * 获取客户端请求参数中所有的信息 * @param request * @return */ private Map<String, String> getAllRequestP ...
- 1130 - Host '' is not allowerd to connect to this MySQL server,
是因为缺少访问权限,在MySQL ->User表里 执行 INSERT INTO `user` VALUES ('%', 'root', '*81F5E21E35407D884A6CD4A731 ...
- The Cheap KD 8 is rumored to arrive online
Nike and also the Oklahoma City Thunder star revealed the Cheap KD 8, which they are calling probabl ...
- ZenCart分类数量打折Category Quantity Discount插件
附件:http://files.cnblogs.com/lzj87980239/Category_Quantity_Discount.rar 效果图后台1.将update.sql导入到数据库 2.将Y ...
- 04 linux用户群组和权限
作业一: 1)新建用户natasha,uid为1000,gid为555,备注信息为“master” 2)修改natasha用户的家目录为/Natasha 3)查看用户信息配置文件的最后一行 4)为na ...