再次包含已排除的安装项目重复检测到的依赖项

发布于 2024-12-16 17:28:01 字数 1436 浏览 2 评论 0原文

我们在使用 Visual Studio 2008 时遇到以下问题,其中即使在将重复检测到的依赖项的排除设置设置为 true 后保存安装项目,一旦重新加载项目,排除设置也会更改回 false。

因此,您必须再次排除检测到的依赖项才能获得所需的输出。我们有一个由 120 多个相互依赖的项目组成的庞大解决方案,其中包含大量 dll 依赖项,因此将这些值改回来是一件很痛苦的事情。

我只是简化了下面的场景(轻描淡写)来说明:

PROJECTS:

  • PROJECTA - 引用 DLL1、DLL2、DLL3
  • PROJECTB - 引用 DLL3、DLL4、PROJECTA
  • PROJECTC - 引用 DLL2、DLL3、DLL4
  • PROJECT1 (设置项目)

    • PROJECTA 的主要输出(手动添加)
    • PROJECTB 的主要输出(手动添加)
    • (检测到VS自动添加的依赖项)
      • PROJECTA(设置 Exclude=True,重新加载后值保持不变)
      • DLL1(设置 Exclude=True,重新加载后值保持不变)
      • DLL2(设置 Exclude=True,重新加载后值变回 False)
      • DLL2(设置 Exclude=True,重新加载后值变回 False)
      • DLL3(没有变化,想要包含)
      • DLL3(设置 Exclude=True,重新加载后值变回 False)
      • DLL3(设置 Exclude=True,重新加载后值变回 False)
      • DLL4(设置 Exclude=True,重新加载后值变回 False)
      • DLL4(设置 Exclude=True,重新加载后值变回 False)

OUTPUT (for PROJECT1.msi):

  • 所需输出:

    • PROJECTA.dll
    • PROJECTB.dll
    • DLL3
  • VS 将排除设置更改回 False 时的输出:

    • PROJECTA.dll
    • PROJECTB.dll
    • DLL2
    • DLL3
    • DLL4

这将导致运行时出现问题(加上臃肿的安装程序)。

我浏览了网络,但尚未找到适合我们设置的可行解决方案。有些问题过去已经被问过,所以我想知道是否已经有一个补丁可以解决这个问题,或者有人有一个新的解决方法可以帮助我们。

除了使用 WIX 并将所有依赖项的“复制本地”设置值设置为 false 之外,是否有人有解决方案使 Visual Studio 保留“排除”设置值?

We are encountering the following issue using Visual Studio 2008 wherein even when you save the setup project after setting the Exclude settings of duplicated detected dependencies to true, once you reload the project, the Exclude settings change back to false.

And because of this, you have to exclude the detected dependencies again to get the desired output. We have a huge solution of interdependent 120+ projects with a vast number of dll dependencies, so it's a pain to change the values back.

I just simplified the scenario below (an understatement) to illustrate:

PROJECTS:

  • PROJECTA - references DLL1, DLL2, DLL3
  • PROJECTB - references DLL3, DLL4, PROJECTA
  • PROJECTC - references DLL2, DLL3, DLL4
  • PROJECT1 (Setup Project)

    • Primary output for PROJECTA (manually added)
    • Primary output for PROJECTB (manually added)
    • (detected dependencies automatically added by VS)
      • PROJECTA (set Exclude=True, value stays the same after reload)
      • DLL1 (set Exclude=True, value stays the same after reload)
      • DLL2 (set Exclude=True, value changes back to False after reload)
      • DLL2 (set Exclude=True, value changes back to False after reload)
      • DLL3 (no change, want to include)
      • DLL3 (set Exclude=True, value changes back to False after reload)
      • DLL3 (set Exclude=True, value changes back to False after reload)
      • DLL4 (set Exclude=True, value changes back to False after reload)
      • DLL4 (set Exclude=True, value changes back to False after reload)

OUTPUT (for PROJECT1.msi):

  • Desired Output:

    • PROJECTA.dll
    • PROJECTB.dll
    • DLL3
  • Output when VS changes the Exclude settings back to False:

    • PROJECTA.dll
    • PROJECTB.dll
    • DLL2
    • DLL3
    • DLL4

This will cause issues at runtime (plus a bloated installer).

I browsed the web and did not find a workable solution for our setup yet. And some of the questions has been asked in the past, so I'm wondering if there is already a patch for this, or somebody has a new workaround that would help us.

Aside from using WIX and setting the Copy Local setting value of all the dependencies to false, does anybody has a solution to make Visual Studio keep the Exclude setting value?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文