次要升级要求

发布于 2024-12-10 10:57:01 字数 159 浏览 0 评论 0原文

我想使用小型升级,但我对此类升级的要求有两个问题。

是否有可能:

  1. 从仅在一个现有功能中共享的组件中删除文件(不是 KeyPath)(并且删除组件后仍然不为空)?
  2. 删除现有组件(我猜这会违反规则)?

感谢您的帮助!

I wanna use minor upgrades, but I have two questions about the requirements for this type of upgrade.

Is it possible:

  1. to remove a file(not KeyPath) from a component which is shared just in one existing feature (and after the removing the component is still not empty)?
  2. to remove an existing component (I guess that it will violate the rules)?

Thanks for help!

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

梦罢 2024-12-17 10:57:01

从共享的组件中删除文件(不是 KeyPath)
一项现有功能

您可以从升级包中删除它,但更新不会在目标计算机上删除它。仅当组件的关键路径发生更改时才会更新组件: http ://msdn.microsoft.com/en-us/library/windows/desktop/aa368599(v=vs.85).aspx

要删除它,您可以尝试使用自定义操作,但我不确定它是否有效。更新时删除资源的最佳方法是使用主要升级。

删除现有组件(我猜这会违反
规则)?

如果删除某个组件,它就不再是次要升级。这属于主要升级类别。

to remove a file(not KeyPath) from a component which is shared just in
one existing feature

You can remove it from your upgraded package, but the update won't remove it on the target machine. A component is updated only if it's key path is changed: http://msdn.microsoft.com/en-us/library/windows/desktop/aa368599(v=vs.85).aspx

To remove it you can try using a custom action, but I'm not sure it will work. The best approach for removing resources when updating is using a major upgrade.

to remove an existing component (I guess that it will violate the
rules)?

If you remove a component it's no longer a minor upgrade. This falls into the major upgrade category.

小矜持 2024-12-17 10:57:01

这是可能的,但不建议这样做。 更改组件代码说明添加或删除文件需要更改组件代码。如果不这样做,如果组件规则被破坏会发生什么描述了一些情况可能会出错。请注意,较小的升级通常对组件规则特别挑剔。

在次要升级中删除组件也是一个禁忌。相反,有些人建议将该组件标记为传递并给予在次要升级期间将其删除是一个错误的条件。请注意,组件规则仍然适用于仅要删除的组件。

It's possible, but it is not recommended. Changing the Component Code documents that addition or removal of files requires changing the component code. If you do not, What happens if the component rules are broken describes some of what can go wrong. Note that minor upgrades are often particularly picky about component rules.

Removing a component across a minor upgrade is also a no-no. Instead some people recommend marking that component as transitive and giving it a false condition to have it be removed during the minor upgrade. Note that component rules still apply to the component that only exists to be removed.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文