Showing error message with C # AfterInstall Event
Can someone please tell me how to display an error message in C # while running AfterInstallEvent?
My project uses a Microsoft Install and Deployment project and then I created a class that is called when the AfterInstall event is fired.
MessageBox.Show (); doesn't work ... "The name" MessageBox "is not displayed in the current context."
If it were that simple, I wouldn't ask !?
+1
Dean
source
to share
2 answers
This is very old, but I will answer anyway:
This is just a missing link.
Add a reference to System.Windows.Forms in the project containing the class. Also add "using System.Windows.Forms;" to the top of your class file.
As far as I know, there should be no problem displaying the messageboxes from a custom install action.
+1
user93202
source
to share