我可以将 nuget 包配置从一个项目复制到另一个项目吗? [英] Can I copy the nuget package configuration from one project to another?

查看:59
本文介绍了我可以将 nuget 包配置从一个项目复制到另一个项目吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我在 VS2010 中有一个项目,我使用 nuget 为其添加了许多包,那么我可以在该解决方案中创建另一个项目并以某种方式获得完全相同的包配置吗?

If I have one project in VS2010 for which I have added a number of packages using nuget, can I then create another project in that solution and somehow obtain the exact same package configuration?

推荐答案

这个问题有点老了,但我决定将我的做法分享给任何寻求相同解决方案的人:

This question is a bit old, but I decided to share how I am doing this to anyone looking for the same:

  1. 拖拽将packages.config 从已安装包的项目中删除到新项目中.
  2. 打开包管理器控制台
  3. 类型:

Update-Package -Reinstall -ProjectName [目标项目名称]

  • 按回车键:)
  • Update-Package -Reinstall -ProjectName [name of your target project]

  • Press enter :)
  • 希望能帮到你

    这篇关于我可以将 nuget 包配置从一个项目复制到另一个项目吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆