Nuget命令将现有引用替换为nuget引用?

编程入门 行业动态 更新时间:2024-10-26 02:34:46
本文介绍了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?

交叉发布到Dev Express

推荐答案

除非在XAF社区项目 expandFramework .在某些情况下,它是行不通的,但是对于类似的情况,这是我们的工作.

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.

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

  • 安装在第3步中找到的软件包
  • `Nuget Install packageName -OutputFolder $commonOutputFolder

  • 将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引用?

    本文发布于:2023-11-07 14:49:54,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1566744.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:命令   Nuget   nuget

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!