Nuget命令将现有引用替换为nuget引用? [英] Nuget command to replace existing references with nuget references?

查看:182
本文介绍了Nuget命令将现有引用替换为nuget引用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在VS2017中,我使用XAF解决方案向导(实体框架代码-首先)创建了一个新的Winforms项目

In VS2017 I created a new Winforms project using the XAF Solutions Wizard ( Entity Framework Code - First)

该向导会根据我选择的选项添加引用.

The wizard adds references according to options I select.

现在,我想更改所有软件包以将我的Nuget提要用于Dev Express参考.

Now I want to change all the packages to use my Nuget Feed for the Dev Express References.

XAF确实有Nuget包

是否可以使用Nuget命令自动执行此操作?

Is there a Nuget command that I can use to do this automatically?

推荐答案

除非在XAF社区项目

There is no way to do this with Nugets unless you script your way out as we are doing in XAF community project expandFramework. For some cases it won't work, however for a similar case here is what we do.

  1. 从DevExpress开始解析所有项目以供参考,并构建程序集列表
  2. 对于列表中的所有程序集,请将它们添加到packages.config
  3. 对于所有程序集,请使用 DevExpress.PackageContent 项目链接到包含程序包的链接.
  1. Parse all your projects for References start with DevExpress and construct a list of assemblies
  2. For all assemblies in the list add them to packages.config
  3. For all assemblies use the DevExpress.PackageContent project to link to the containing the packages.

Get-DxNugets 18.2.6

  1. 安装在第3步中找到的软件包

`Nuget  Install packageName -OutputFolder $commonOutputFolder

  1. 将DevExpress引用HintPath更新到软件包安装文件夹.

Update-HintPath -OutputPath "$packageInstallationfolder" -SourcesPath $rootPath -filter "DevExpress*"

所有powershell函数都来自 XpandPosh 项目.不幸的是,有许多有用的方法,没有文档.但是您可以获得支持

all powershell functions come from the XpandPosh project. There are many helpful methods there unfortunately no docs. But you can get support

这篇关于Nuget命令将现有引用替换为nuget引用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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