手动更新了packages.config Nuget配置文件,自动引用dll
通过Google查询到:http://stackoverflow.com/questions/6876732/how-do-i-get-nuget-to-install-update-all-the-packages-in-the-packages-config
You can use nuget.exe to restore your packages or with NuGet 2.7, or above, installed you can simply compile your solution in Visual Studio, which will also restore the missing packages.
For NuGet.exe you can run the following command for each project.
nuget install packages.config
Or with NuGet 2.7 you can restore all packages in the solution using the command line.
nuget restore YourSolution.sln
Both of these will pull down the packages. Your project files will not be modified however when running this command so the project should already have a reference to the NuGet packages. If this is not the case then you can use Visual Studio to install the packages.
With NuGet 2.7, and above, Visual Studio will automatically restore missing NuGet packages when you build your solution so there is no need to use NuGet.exe.
To update all the packages in your solution, first restore them, and then you can either use NuGet.exe to update the packages or from within Visual Studio you can update the packages from the Package Manager Console window, or finally you can use the Manage Packages dialog.
From the command line you can update packages in the solution to the latest version available from nuget.org.
nuget update YourSolution.sln
Note that this will not run any PowerShell scripts in any NuGet packages.
From within Visual Studio you can use the Package Manager Console to also update the packages. This has the benefit that any PowerShell scripts will be run as part of the update where as using NuGet.exe will not run them. The following command will update all packages in every project to the latest version available from nuget.org.
Update-Package
You can also restrict this down to one project.
Update-Package -Project YourProjectName
If you want to reinstall the packages to the same versions as were previously installed then you can use the -reinstall argument with Update-Package command.
Update-Package -reinstall
You can also restrict this down to one project.
Update-Package -reinstall -Project YourProjectName
The -reinstall option will first uninstall and then install the package back again into a project.
Or, you can update the packages using the Manage Packages dialog.
Updates:
- 2013/07/10 - Updated with information about nuget restore in NuGet 2.7
- 2014/07/06 - Updated with information about automatic package restore in Visual Studio and brought the answer up to date with other changes to NuGet.
- 2014/11/21 - Updated with information about
-reinstall
PS:
在VS工具在打开 程序包管理器控制台
执行命令:Update-Package -reinstall 更新所有项目的 Package.config 文件中引用的dll
执行命令: Update-Package -reinstall -Project YourProjectName 更新指定的项目的Package.config配置文件中引用的dll
手动更新了packages.config Nuget配置文件,自动引用dll的更多相关文章
- 更新的packages.config所有的软件包?
1. 你NuGet.exe的恢复你的包.运行的每个项目. nuget install packages.config 或用NuGet的2.7可以恢复所有包中的行. nuget restore Your ...
- c# 项目nuget不自动安装dll
问题 创建的项目提交到服务器上,其他人下载项目后无法生成解决方案成功,无法自动生成dll,无法自动下载安装相应的插件 解决方案 删除packages文件夹即可,nuget就可以自动安装相关的dll了
- 自动将 NuGet 包的引用方式从 packages.config 升级为 PackageReference
在前段时间我写了一篇迁移 csproj 格式的博客 将 WPF.UWP 以及其他各种类型的旧样式的 csproj 文件迁移成新样式的 csproj 文件,不过全过程是手工进行的,而且到最后处理 XAM ...
- 如何最快速地将旧的 NuGet 包 (2.x, packages.config) 升级成新的 NuGet 包 (4.x, PackageReference)
最近我将项目格式进行了升级,从旧的 csproj 升级成了新的 csproj:NuGet 包管理的方式也从 packages.config 升级成了 PackageReference.然而迁移完才发现 ...
- ios开发 数据库版本迁移手动更新迭代和自动更新迭代
数据库版本迁移顾名思义就是在原有的数据库中更新数据库,数据库中的数据保持不变对表的增.删.该.查. 数据持久化存储: plist文件(属性列表) preference(偏好设置) NSKeyedArc ...
- ios开发数据库版本迁移手动更新迭代和自动更新迭代艺术(二)
由于大家都热衷于对ios开发数据库版本迁移手动更新迭代和自动更新迭代艺术(一)的浏览下面我分享下我的源文件git仓库: 用法(这边我是对缓存的一些操作不需要可以省去):https://github.c ...
- 分享下使用 svn,测试服务器代码自动更新、线上服务器代码手动更新的配置经验
分享下使用 svn,测试服务器代码自动更新.线上服务器代码手动更新的配置经验 利用SVN的POST-COMMIT钩子自动部署代码 Linux SVN 命令详解 Linux SVN 命令详解2 使用sv ...
- 使用Nuget重新安装packages.config中的组件的方法
Update-Package -ProjectName 'Ko.app.web' -Reinstall 该语句作用:按照packages.config中给出的程序组件,重新下载安装一遍.
- NuGet更新引用Dll
第一种 通过 "Add Library Package Reference..." 添加 点击 ‘Add Library Package Reference...’ , 搜索你要添 ...
随机推荐
- inux CPU监控分析
一.vmstat 可对操作系统的虚拟内存.进程.CPU活动进行监控 Procs(进程) r: 运行队列中进程数量,这个值也可以判断是否需要增加CPU.(长期大于1) b: 等待IO的进程数量. Mem ...
- Oracle数据库小知识点整理
-- 数据库存储数据 -- 市面上主流的数据库有哪些 -- 甲骨文 oracle mysql -- IBM db2 金融 -- 微软 sqlserver --这些是关系型数据库. -- ...
- 部署vue-element-admin流程
1.修改环境变量: 在以下两个文件: .env_staging [如果修改这个,需要以npm run build:stage启动] .env_production [如果修改这个,需要以npm run ...
- 在服务器的tomcat中部署手机apk项目,浏览器或手机下载不能根据URL下载和安装apk文件
Android的APK包不能下载或安装,需在tomcat的web.xml加入 <mime-mapping> <extension>apk</extensio ...
- docker升级步骤及注意事项
centos系统默认安装的docker版本是1.13版本,在安装部分镜像时可能出现兼容问题,本文通过实际操作总结Docker升级最新版本步骤及可能出现的问题,供各位参考. 环境:CentOS Linu ...
- 使用Data Guard迁移到RAC (Doc ID 273015.1)
Migrating to RAC using Data Guard (Doc ID 273015.1) APPLIES TO: Oracle Database Cloud Exadata Servic ...
- Spring学习的第三天
问题分析:在刚开始进行银行转账案例时,会获取四个连接,分别是查询接入.转出账户.更新转入.转出账户.这样会使转账不同步,如果某一处出现异常,前面的代码执行了,而后面的更新却没执行,导致一个账户加钱而另 ...
- 统计学习方法与Python实现(三)——朴素贝叶斯法
统计学习方法与Python实现(三)——朴素贝叶斯法 iwehdio的博客园:https://www.cnblogs.com/iwehdio/ 1.定义 朴素贝叶斯法是基于贝叶斯定理与特征条件独立假设 ...
- Fiddler使用方法之Fiddler显示IP,Fiddler中文乱码解决方法以及Fiddler模拟发送get/post请求
Fiddler是一个HTTP的调试代理,以代理服务器的方式,监听系统的Http网络数据流动,是我们常用的抓包工具之一 今天为大家分享一下几个使用Fiddler的小技巧 一.Fiddler抓包中文乱码问 ...
- 网络编程懒人入门(十):一泡尿的时间,快速读懂QUIC协议
1.TCP协议到底怎么了? 现时的互联网应用中,Web平台(准确地说是基于HTTP及其延伸协议的客户端/服务器应用)的数据传输都基于 TCP 协议. 但TCP 协议在创建连接之前需要进行三次握手(如下 ...