VS2010 安装项目在“选择安装文件夹”时冻结

发布于 2024-09-10 06:12:53 字数 355 浏览 6 评论 0原文

我有一个非常基本的 c# winforms 项目,它有一个关联的安装项目。它有一个自定义对话框(文本框 (A))。当我运行安装程序时,当我单击“下一步”进入“选择安装文件夹”对话框时,安装程​​序会冻结。几分钟后,它解冻了。当我最终单击安装时,窗口消失,但msiexec.exe仍在后台运行(实际上是两个)。

有人可以告诉我到底出了什么问题吗?

编辑:这是 msiexec 日志: http://www.mediafire.com/?jqmmimwjgni

I have a pretty basic c# winforms project that has an associated setup project. It has one custom dialog (Textboxes (A)). When I run the installer, it freezes when I click Next to go to the Select Installation Folder dialog. Then after several minutes, it unfreezes. When I finally click Install, the window disappears but msiexec.exe is still running in the background (two of them actually).

Could someone please tell me what the heck is going wrong?

EDIT: Here's the msiexec log: http://www.mediafire.com/?jqmmimwjgni

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

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

发布评论

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

评论(2

伴随着你 2024-09-17 06:12:53

问题似乎不在于名称的长度,而在于名称 DATABASE 用作包含安装程序文件的完整文件名1 的内部 MSI 属性。

如果将编辑字段绑定到该属性,则该属性的值将被编辑字段包含的任何内容覆盖。

MSI 不喜欢这样。不幸的是,我找不到任何记录保留名称 DATABASE 的地方(记录了内置 MSI 属性此处)。所以我不会说这是 MSI 中的错误,而是糟糕的文档/开发人员可用性(不幸的是,Windows Installer 经常出现这种情况)。

在您的日志文件中,您将找到以下条目:

MSI (c) (64:1C) [19:30:12:339]:属性更改:修改数据库属性。其当前值为“d:\ ... mysetup.msi”。它的新值:“ProgressNotes”。

稍后当安装程序挂起时:

MSI (c) (64:68) [19:30:41:701]:注释:1:1314 2:进度说明

这里可能应该显示 MSI 文件的完整路径...

解决方案:使用任何其他不是的名称预订的。

1如果将 Edit1Property 设置为“DBProperty”并将 Edit1Value 设置为“[DATABASE]”(不带单引号),您可以轻松看到这一点。

The problem does not seem to be the length of the name, but the fact that the name DATABASE is used as an internal MSI property containing the full filename of the installer file1.

If you bind your edit field to that property the value of this property will be overwritten with whatever the edit field contains.

MSI doesn't like that. Unfortunately, I could not find any place where it is documented that the name DATABASE is reserved (The built-in MSI properties are documented here). So I wouldn't say this is a bug in MSI, but bad documentation/developer usability (as it is unfortunately too often the case with Windows Installer).

In your log file you will find the following entries:

MSI (c) (64:1C) [19:30:12:339]: PROPERTY CHANGE: Modifying DATABASE property. Its current value is 'd:\ ... mysetup.msi'. Its new value: 'ProgressNotes'.

And later on when the installer is hanging:

MSI (c) (64:68) [19:30:41:701]: Note: 1: 1314 2: ProgressNotes

Here should probably appear the full path to your MSI file...

Solution: Use any other name that is not reserved.

1You can easily see this if you set Edit1Property to 'DBProperty' and Edit1Value to '[DATABASE]' (without the single quotes).

等往事风中吹 2024-09-17 06:12:53

我找到了!我很确定这是安装项目的某种错误(其他人可以确认这一点吗?)。

编辑:参见0xA3的答案对于失败的真正原因

重现步骤:

  1. 添加文本框(A)
  2. Edit1PropertyEdit2Property 等中的一组添加到 DATABASE GREATER 大于 7字符
  3. 重建并安装项目(它应该挂在选择安装文件夹屏幕上)。

希望这对某人有帮助。

PS - 有史以来最糟糕的错误:)

错误报告 已记录 Microsoft。

I found it! I'm pretty sure this is a bug of some sort with the Setup project (can someone else confirm this?).

EDIT: See 0xA3's answer for the real reason as to why this fails.

Steps to reproduce:

  1. Add Textboxes (A).
  2. Add a set one of the Edit1Property, Edit2Property etc to DATABASE something GREATER than 7 characters.
  3. Rebuild and install the project (it should hang on the Select Installation Folder screen).

Hope this helps someone.

PS - Worst bug ever to track down :)

A bug report has been logged with Microsoft.

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