我编写了一个工具,它应该被称为 .Net 安装程序项目的一部分。
它应该向用户询问目录,然后更新我的配置。
我使用以下代码来显示文件选择器 dlg:
{
FolderBrowserDialog dlg = new FolderBrowserDialog();
dlg.Description = "Trace-Verzeichnis auswählen";
dlg.ShowNewFolderButton = true;
if (DialogResult.OK == dlg.ShowDialog( this ))
{
tbTraceDir.Text = dlg.SelectedPath;
}
}
如果我从命令行运行该工具,则FolderBrowserDialog
显示正常。如果它作为安装程序包的一部分从安装程序类中调用,它会在 ShowDialog() 处无限期挂起
编辑:当我从 VStudio 或从命令行运行它时,行为相同......我正在运行 .Net 4(不是客户端配置文件)
任何提示我可能做错了什么?
谢谢
马里奥