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) ...
随机推荐
- ORACLE内存结构之SGA
SGA的管理: SQL> show parameter sga NAME TYPE VALUE ---------- ...
- Python爬虫实例(二)使用selenium抓取斗鱼直播平台数据
程序说明:抓取斗鱼直播平台的直播房间号及其观众人数,最后统计出某一时刻的总直播人数和总观众人数. 过程分析: 一.进入斗鱼首页http://www.douyu.com/directory/all 进入 ...
- Windows中压缩版的MySQL的安装、配置
本次笔记是根据mysql-8.0.13-winx64版本编写: 1.将下载的压缩包解压到自己想放的目录 2.右键计算机 -> 属性 -> 高级系统设置 -> 环境变量 -> 系 ...
- python练习题(持续更新中。。。。。)
1.检验注册用户是否合法:需要输入用户名,校验用户名是否被注册,如已注册,提示已经注册过,没注册就可以注册:用户名不能为空:用户名长度必须在6-13位之间:最多只能输入三次. users = ['aa ...
- Mac 升级 OpenSSL
[转载自 https://blog.csdn.net/focusjava/article/details/51179297 ] [升级Mac的openssl] 终端下 openssl version ...
- ActiveMQ简单入门
一.创建一个简单的Hello World案例 首先需要导入activemq-all-5.14.5.jar包,写生产端: package com.ietree.mq.helloworld; import ...
- yii2引入js和css
assets/AppAsset.php public $css = [ 'css/site.css', 'css/font/css/font-awesome.min.css', 'css/doc.cs ...
- PEP8编码规范
1.代码布局设计 1.1 缩进 -4个空格进行缩进 1.2 tab键-在python2中tab和空格是混用的,但是在python中基本上使用tab(pycharm开发工具会自动对代码缩进) 1.3 最 ...
- k8s-安装coreos+kubernetes
开始 软件 版本 分支 简称 Container Linux 1465.7.0 stable coreos kubernetes 1.7.3 stable k8s 本文主要内容来自coreos.com ...
- android 带listview对话框
package com.example.dialog2; import android.os.Bundle;import android.app.Activity;import android.app ...