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) ...
随机推荐
- Writing a Discard Server 写个抛弃服务器 世上最简单的协议
Netty.docs: User guide for 4.x https://netty.io/wiki/user-guide-for-4.x.html The most simplistic pro ...
- nodejs(一)
nodejs第一章节 使用node来实现第一个http服务器 var http = require(‘http’); http.createServer(function (request, resp ...
- Yii2 里使用Redis扩展
Redis是个很不错的Nosql数据库,比Memcached的好处是能持久化数据. Yii2里使用Redis ,首先要扩展Redis.可以在composer.json 里添加 redis " ...
- 并发编程 - io模型 - 总结
1.提交任务得方式: 同步:提交完任务,等结果,执行下一个任务 异步:提交完,接着执行,异步 + 回调 异步不等结果,提交完任务,任务执行完后,会自动触发回调函数2.同步不等于阻塞: 阻塞:遇到io, ...
- HTTP协议 (七) Cookie(转)
add by zhj: 客户端通过request header:cookie将cookie发给服务端,而服务端通过response header: set-cookie将cookie传回客户端 一条c ...
- Linux下桥接模式详解一
注册博客园已经好长时间,一直以来也没有在上面写过文章,都是随意的记录在了未知笔记上,今天开始本着分享和学习的精神想把之前总结的笔记逐步分享到博客园,和大家一起学习,一起进步吧! 2016-09-20 ...
- django-vue之信息过滤(过滤课程)
一 vue前端代码 实现的内容,通过对课程的分类,在每个不同的课程分类下显示相应的内容 <template> <div class="course"> & ...
- 深入了解跟踪(trace)
深入了解跟踪(trace) 转自:https://www.cnblogs.com/zhijianliutang/p/4113911.html 前言 一提到跟踪俩字,很多人想到警匪片中的场景,同样在我们 ...
- Java基础—输入输出流
流的概念 在Java中,流是从源到目的地的字节的有序序列.Java中有两种基本的流——输入流(InputStream)和输出流(OutputStream). 根据流相对于程序的另一个端点的不同,分为节 ...
- Oracle获取当前session ID的方法
1.使用v$mystat视图获取当前session的ID select sid from v$mystat; 2.使用userenv内部函数获取当前session的ID select userenv( ...