Replace workaround with better solution

Thanks @mlehmk
This commit is contained in:
Drew DeVault 2015-06-18 12:53:24 -04:00
parent 73869d7123
commit ce4d662e67

View File

@ -10,14 +10,14 @@ namespace TrueCraft.Client
{
public static class Program
{
[STAThread]
public static void Main(string[] args)
{
AppDomain.CurrentDomain.AssemblyResolve += AppDomain_CurrentDomain_AssemblyResolve;
var thread = new Thread(() => Main_Thread(args));
thread.SetApartmentState(ApartmentState.STA);
thread.Start();
thread.Join();
// We need to run this in another method to avoid referencing MonoGame before registering
// our AssemblyResolve handler
Main_Thread(args);
}
static Assembly AppDomain_CurrentDomain_AssemblyResolve (object sender, ResolveEventArgs args)