c# - 显示来自 C# AfterInstall 事件的错误消息

标签 c# windows installation

谁能告诉我在执行 AfterInstallEvent 期间如何在 C# 中显示错误消息?

我的项目使用 Microsoft 设置和部署项目,然后我创建了一个在 AfterInstall 事件触发时调用的类。

MessageBox.Show();不起作用...“名称‘MessageBox’未出现在当前上下文中”。

要是这么简单我就不问了!?

最佳答案

真正的解决方案是使用作用域。是这样的: global::System.Windows.Forms.MessageBox.Show(ex,"Error",MessageBoxButtons.OK, MessageBoxIcon.Error);

干杯

关于c# - 显示来自 C# AfterInstall 事件的错误消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/343678/

相关文章:

PHP Pear 安装程序停留在 21%

windows - 将变量与包含开关一起使用时 Get-ChildItem 失败

visual-studio-2008 - 将 Visual Studio 2008 试用版升级到完整版时出现问题

linux - 安装 ubuntu 时禁用多路径

c# - 将日期时间插入 Access

c++ - 加载的 OpenGL 函数是上下文特定的还是线程特定的? ( Windows )

windows - Windows 中的数据包过滤(XP、7 等)

c# - LINQ 操作是否返回与正在操作的集合具有相同索引的集合?

c# - Dictionary(of T) 中的 KeyNotFound 异常

c# - 从 c# 内存不足异常调用 c++ 委托(delegate)