VS2010 安装项目在“选择安装文件夹”时冻结
我有一个非常基本的 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
问题似乎不在于名称的长度,而在于名称 DATABASE 用作包含安装程序文件的完整文件名1 的内部 MSI 属性。
如果将编辑字段绑定到该属性,则该属性的值将被编辑字段包含的任何内容覆盖。
MSI 不喜欢这样。不幸的是,我找不到任何记录保留名称 DATABASE 的地方(记录了内置 MSI 属性此处)。所以我不会说这是 MSI 中的错误,而是糟糕的文档/开发人员可用性(不幸的是,Windows Installer 经常出现这种情况)。
在您的日志文件中,您将找到以下条目:
稍后当安装程序挂起时:
这里可能应该显示 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:
And later on when the installer is hanging:
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).
我找到了!我很确定这是安装项目的某种错误(其他人可以确认这一点吗?)。
编辑:参见0xA3的答案对于失败的真正原因。
重现步骤:
文本框(A)
。Edit1Property
、Edit2Property
等中的一组添加到DATABASE
GREATER 大于 7字符。选择安装文件夹
屏幕上)。希望这对某人有帮助。
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:
Textboxes (A)
.Edit1Property
,Edit2Property
etc toDATABASE
something GREATER than 7 characters.Select Installation Folder
screen).Hope this helps someone.
PS - Worst bug ever to track down :)
A bug report has been logged with Microsoft.