From a3ccd8ec0f16fec6714ebdddc6b3a9ba348cd0c2 Mon Sep 17 00:00:00 2001 From: Stan Lagun Date: Tue, 10 Sep 2013 01:45:49 +0400 Subject: [PATCH] Project retargeted to .NET 4.0CP. Fixed incorrect warning message in logs Change-Id: I2a2915434f1fbb4f79c8d843a431fd75f4bfb911 --- WindowsAgent/App.config | 14 ++++++-------- WindowsAgent/PlanExecutor.cs | 5 +++-- WindowsAgent/Program.cs | 2 +- WindowsAgent/WindowsAgent.csproj | 7 +++++-- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/WindowsAgent/App.config b/WindowsAgent/App.config index 7a2641c7..85d96b37 100644 --- a/WindowsAgent/App.config +++ b/WindowsAgent/App.config @@ -1,20 +1,18 @@ - +
- + - + - + - + @@ -27,4 +25,4 @@ - \ No newline at end of file + diff --git a/WindowsAgent/PlanExecutor.cs b/WindowsAgent/PlanExecutor.cs index 17f6c99a..628eeb4d 100644 --- a/WindowsAgent/PlanExecutor.cs +++ b/WindowsAgent/PlanExecutor.cs @@ -42,7 +42,9 @@ namespace Mirantis.Murano.WindowsAgent List currentResults = null; try { - currentResults = JsonConvert.DeserializeObject>(File.ReadAllText(resultPath)); + currentResults = File.Exists(resultPath) ? + JsonConvert.DeserializeObject>(File.ReadAllText(resultPath)) : + new List(); } catch(Exception exception) { @@ -50,7 +52,6 @@ namespace Mirantis.Murano.WindowsAgent currentResults = new List(); } - runSpace = RunspaceFactory.CreateRunspace(); runSpace.Open(); diff --git a/WindowsAgent/Program.cs b/WindowsAgent/Program.cs index 007f419e..5aeba8a8 100644 --- a/WindowsAgent/Program.cs +++ b/WindowsAgent/Program.cs @@ -30,7 +30,7 @@ namespace Mirantis.Murano.WindowsAgent { base.OnStart(args); - Log.Info("Version 0.5.2"); + Log.Info("Version 0.5.3"); this.rabbitMqClient = new RabbitMqClient(); diff --git a/WindowsAgent/WindowsAgent.csproj b/WindowsAgent/WindowsAgent.csproj index f6c714b5..bf9aba9a 100644 --- a/WindowsAgent/WindowsAgent.csproj +++ b/WindowsAgent/WindowsAgent.csproj @@ -9,8 +9,9 @@ Properties Mirantis.Murano.WindowsAgent WindowsAgent - v4.5 + v4.0 512 + Client AnyCPU @@ -62,7 +63,9 @@ - + + Component +