aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-08-22 18:40:34 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-08-22 18:40:34 +0300
commit774da535e732ecd5a3737550ef1d35819a1e7fc6 (patch)
treee1d7de9edf61ff954562ce04c23f3a0102f36612 /Software/Visual_Studio
parent439ee2d80eab039c2dee00f697d2d814ec67247e (diff)
downloadTango-774da535e732ecd5a3737550ef1d35819a1e7fc6.tar.gz
Tango-774da535e732ecd5a3737550ef1d35819a1e7fc6.zip
Remove old dll files on machine studio update.
Diffstat (limited to 'Software/Visual_Studio')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Updater/MainWindow.xaml.cs16
1 files changed, 13 insertions, 3 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Updater/MainWindow.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Updater/MainWindow.xaml.cs
index a0c6928d2..4e6a8ad63 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Updater/MainWindow.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Updater/MainWindow.xaml.cs
@@ -47,6 +47,7 @@ namespace Tango.MachineStudio.Updater
private void Update()
{
EnsureMachineStudioIsDown();
+ RemoveOldDLLFiles();
ReplaceFiles();
StartMachineStudio();
Environment.Exit(0);
@@ -65,6 +66,18 @@ namespace Tango.MachineStudio.Updater
p.Start();
}
+ private void RemoveOldDLLFiles()
+ {
+ foreach (string dll in Directory.GetFiles(_appPath, "*.dll"))
+ {
+ try
+ {
+ File.Delete(dll);
+ }
+ catch { }
+ }
+ }
+
private void ReplaceFiles()
{
int maxProgress = Directory.GetFiles(_sourceFolder, "*.*", SearchOption.AllDirectories).Length;
@@ -133,9 +146,6 @@ namespace Tango.MachineStudio.Updater
} while (appProcess != null);
}
- /// <summary>
- /// Forces UI rendering.
- /// </summary>
private void DoEvents()
{
Application.Current.Dispatcher.Invoke(DispatcherPriority.Background, new Action(delegate { }));