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 Programe】WSGI (Web Server Gateway Interface)
Part1: What is a Web server? 一个位于物理服务器上的网络服务器(服务器里的服务器),等待客户端去发送request,当服务器接收到request,就会生成一个respons ...
- Python resources
我想很多程序员应该记得 GitHub 上有一个 Awesome - XXX 系列的资源整理.awesome-python 是 vinta 发起维护的 Python 资源列表,内容包括:Web框架.网络 ...
- 小程序 修改按钮button样式:去边框、圆角及文字居左对齐、修改按钮高度
因为有要button和view显示的样式相同的需要 所以要去掉按钮的边框,圆角,背景色,文字需要居左对齐,代码如下: 关键是按钮的样式: 1. 去掉边框: .user-phone-btn::after ...
- getResource()和getResourceAsStream以及路径问题(转)
用JAVA获取文件,听似简单,但对于很多像我这样的新人来说,还是掌握颇浅,用起来感觉颇深,大常最经常用的,就是用JAVA的File类,如要取得c:/test.txt文件,就会这样用File file ...
- Myeclipse更新SVNStatusSubscriber 时报告了错误。1 中的 0 个资源已经同步。
1.先确认SVN服务是否能连接,或权限. 方法:在项目目录下右键选择repo-browser 能打开就表示正常. 2.同样在项目目录下选择cleaup 选择下面3个选项 clean up workin ...
- 浅谈virtualenv(虚拟环境)
简介 virtualenv为应用提供了隔离的Python运行环境,解决了不同应用间多版本的冲突问题. 例如: 如果我们要同时开发多个应用程序,那这些应用程序都会共用一个Python,就是安装在系统的P ...
- 前端 javascript 数据类型 布尔类型
python 是大写 True javascript 是小写 true false 也是 布尔类型仅包含真假,与Python不同的是其首字母小写. == 比较值相等 != 不等于 ...
- Jmeter(十)Linux下配置安装Jmeter及执行测试任务
一.安装JDK7.0版本 1.先卸载服务器自带的jdk软件包 # java -version #查看服务器是否安装过 # rpm -qa |grep gcj #查看服务器安装的jdk软件包信息 # y ...
- 从原型链看DOM--Text类型
文本节点由Text类型表示,包含的是可以按照字面解释的纯文本内容,纯文本中可以包含转义后的HTML字符但不能包含HTML代码.原型链继承关系为:textNode.__proto__->Text. ...
- su 与 su - 区别
su与su -都是用来切换用户的命令,简单说它们之间的区别就是:su -切换的干净彻底,而su 切换用户却拖泥带水. su su username,切换到指定用户,但是当前目录不会变化,环境变量还是上 ...