private void MsBuild(MsBuildActivity activity, string host)
 {
     try
     {
         var msBuildScript = new ScriptWithParameters();
         msBuildScript.Script = this.ActivityScriptMap.ExecutionScript;
         msBuildScript.Params = new Dictionary <string, object>();
         msBuildScript.Params.Add("localMsBuildPath", activity.LocalMsBuildPath);
         msBuildScript.Params.Add("solutionPath", activity.SolutionPath);
         msBuildScript.Params.Add("buildTargets", activity.BuildTargets);
         msBuildScript.Params.Add("buildProperties", activity.BuildProperties);
         var response = _shellManager.ExecuteCommands(host, new List <ScriptWithParameters> {
             msBuildScript
         }, true);
     }
     catch (RemoteException rEx)
     {
         logger.Error(rEx.Message);
         HandleException(rEx, activity);
     }
     catch (ApplicationException appEx)
     {
         logger.Error(appEx.Message);
         HandleException(appEx, activity);
     }
 }
        private bool ContainsParamsFromActivity(ScriptWithParameters scriptWithParams, MsBuildActivity activity)
        {
            var parameters = scriptWithParams.Params;

            return
                (activity.LocalMsBuildPath.Equals(parameters["localMsBuildPath"].ToString(), StringComparison.CurrentCultureIgnoreCase) &&
                 activity.SolutionPath.Equals(parameters["solutionPath"].ToString(), StringComparison.CurrentCultureIgnoreCase) &&
                 activity.BuildProperties.Equals(parameters["buildProperties"].ToString(), StringComparison.CurrentCultureIgnoreCase) &&
                 activity.BuildTargets.Equals(parameters["buildTargets"].ToString(), StringComparison.CurrentCultureIgnoreCase) &&
                 !string.IsNullOrWhiteSpace(scriptWithParams.Script) &&
                 parameters.Count == 4);
        }