I have this simple code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Timers;
using System.IO;
using Microsoft.Win32;
using System.Xml;
namespace ConsoleApplication1
{
class Program
{
public static void Main(string[] args)
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.ShowDialog();
}
}
}
which I compile when clicking a button with CSharpCodeProvider
. I then load it into a new AppDomain
and run the Main
method, but the open file dialog is never shown. I know it is running as I have tested this.
Also trying to unload the domain results in an error.
If anymore information is needed just ask!