手动更新了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...’ , 搜索你要添 ...
随机推荐
- feign响应Image流对象
feign面向方法签名的http调用,越来越受欢迎,类型于rpc的thrift,只需要关注方法签名和返回值即可,当然feign响应流对象时,需要我们做一下特殊处理,否则会出现异常.也有一些文章通过重写 ...
- 中国古风唯美水墨工作计划汇报PPT模板推荐
模版来源:http://ppt.dede58.com/
- Java_JDBC 连接
今天,接着上一篇( mysql 数据库 )的基础上,我就写一下 Java 怎样连接数据库,并且操作数据库. 首先,我们先来准备一下数据库连接的驱动: mysql 的 jar 包下载地址:https:/ ...
- LATEX Mathematical Symbols
原文地址:https://www.caam.rice.edu/~heinken/latex/symbols.pdf
- Android五大布局详解——FrameLayout(帧布局)
FrameLayout 这个布局相对前面两节介绍的布局就简单了很多,因此它的应用场景也就特别的少.这种布局没有方便的定位方式,所有的控件都会默认摆放在布局的左上角.新建UILayoutTestThre ...
- solo升级以及自动化更新的方法
使用solo过程总涉及到更新问题,所以就在这里把solo更新的方法总结一下.希望能给小伙伴们一些帮助.如何选择更新方法主要是跟你的部署方式有关,如果你是通过 docker方式进行部署,那么你可以还可以 ...
- DBUtils的使用之查询的操作
1.1 查询的代码实现1.1.1.1 查询一条记录 l 创建一个对象:Account l 查询代码实现 1.1.1.2 查询多条记录
- 【转载】【笔记】vue-router之路由传递参数
参考博客地址:https://blog.51cto.com/4547985/2390799 1.通过<router-link> 标签中的to传参 基本语法: <router-link ...
- ASCII码表收藏
ASCII码表 ASCII码值 ESC键 VK_ESCAPE (27)回车键: VK_RETURN (13)TAB键: VK_TAB (9)Caps Lock键: VK_CAPITAL (20)Shi ...
- koa2跨域模块koa2-cors
之前写了一个api在小程序里调用,但是我不想每次都打开小程序,所以想写一个简单的网页,但是遇到CORB的问题: 经尝试,jsonp等都没起作用,由于我后台是koa写的,发现koa2-cors库可以解决 ...