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 -clear
ordotnet 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.Config
file that setsglobalPackagesFolder
(if using PackageReference) orrepositoryPath
(if usingpackages.config
) to a different folder (see configuration settings - MSBuild only: specify a different folder with the
RestorePackagesPath
property.
To avoid using the cache for HTTP sources, do one of the following:
- Use the
-NoCache
option withnuget restore
or the--no-cache
option 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 -clear
ordotnet 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) ...
随机推荐
- 剖析Docker文件系统:Aufs与Devicemapper
http://www.infoq.com/cn/articles/analysis-of-docker-file-system-aufs-and-devicemapper Docker镜像 典型的Li ...
- PHP Ajax跨域解决
PHP Ajax 跨域问题最佳解决方案 本文通过设置Access-Control-Allow-Origin来实现跨域. 例如:客户端的域名是client.runoob.com,而请求的域名是serve ...
- nginx日志配置(cookie,header,post等字段记录)
如果你对nginx日志格式,有这样那样的要求. 那么就看一下说明吧. $remote_addr The remote host $remote_user The authenticated user ...
- 关于Unix时间戳转北京时间的问题
工具在这里:http://tool.chinaz.com/Tools/unixtime.aspx?qq-pf-to=pcqq.group 今天踩了坑,无论参数是多少,年份总是1970.才发现原来参数必 ...
- 禁止Centos系统You have new mail in /var/spool/mail/root提示
禁止Centos系统You have new mail in /var/spool/mail/root提示 https://blog.csdn.net/oyym_mv/article/details/ ...
- git提交到远程虚拟机
git到自己的虚拟机中第一步:打通git(一)Linux中(ip为10.1.8.1)1.安装git如:Ubuntu中安装gitapt install git 2.Ubuntu中添加git用户sudo ...
- 在虚拟机中还原GHO镜像系统
前置知识 本文精简干练,全是干货.首先要知道,一个原版的Windows系统下载下来就是一个iso格式的文件,也被称为一个镜像.另外还有一种镜像是使用ghost软件制作的,格式为gho的镜像,而ghos ...
- MySQL 参数
I see a lot of people filtering replication with binlog-do-db, binlog-ignore-db, replicate-do-db, an ...
- mysqldump 参数
mysqldump是mysql用于转存储数据库的实用程序.它主要产生一个SQL脚本,其中包含从头重新创建数据库所必需的命令CREATE TABLE INSERT等.对于导出的文件,可使用SOURCE命 ...
- isEnable() 和 isDisplayed() 和 isSelected()
isEnable().isDisplayed()和isSelected() 1.以上三个为布尔类型的函数 2.isEnable用于存储input.select等元素的可编辑状态,可以编辑返回true, ...