public App()
{
#if RELEASE
if (!ApplicationDeployment.IsNetworkDeployed)
{
// this application was started up from the exe that isnt good.
// restart application through clickonce.
string clickOnceApplication = Environment.GetFolderPath(Environment.SpecialFolder.StartMenu) + "\\Programs\\Bend\\Bend\\Bend.appref-ms";
string[] commandLineArgs = Environment.GetCommandLineArgs();
string argument;
if (commandLineArgs.Length > 1)
{
if (System.IO.Path.IsPathRooted(commandLineArgs[1]))
{
argument = commandLineArgs[1];
}
else
{
argument = Environment.CurrentDirectory + "\\" + commandLineArgs[1];
}
}
else
{
argument = "";
}
System.Diagnostics.Process.Start(clickOnceApplication, argument);
this.Shutdown();
}
#endif
ICLRRuntimeInfo runtimeInfo = (ICLRRuntimeInfo)RuntimeEnvironment.GetRuntimeInterfaceAsObject(Guid.Empty, typeof(ICLRRuntimeInfo).GUID);
runtimeInfo.BindAsLegacyV2Runtime();
}