private string BuildMsBuildAdditionalArguments(string msbuildProjPath, IpAddressSettings ipAddressSettings, string additionalArgs, string currentAssemblyFullpath)
        {
            var additionalArguments = String.Concat(msbuildProjPath, " ", additionalArgs, " ", "/fileLoggerParameters:LogFile=MsBuildLog.txt;append=true;Verbosity=normal;Encoding=UTF-8 /l:AutomationTestAssistantCore.MsBuildLogger.TcpIpLogger,",
                                                    currentAssemblyFullpath, ";Ip=", ipAddressSettings.GetIPAddress(), ";Port=", ipAddressSettings.Port, ";");

            return(additionalArguments);
        }
示例#2
0
 public MessageArgsMsTest(Command command, string projectPath, IpAddressSettings ipAddressSettings, string workingDir, string testListContent, string testListName, string resultsFilePath)
     : base(command, projectPath, ipAddressSettings, workingDir)
 {
     TestListContent = testListContent;
     ResultsFilePath = resultsFilePath;
     ListName        = testListName;
 }
        public Process ExecuteMsbuildProject(string msbuildProjPath, IpAddressSettings ipAddressSettings, string additionalArgs = "")
        {
            var currentAssemblyLocation = System.Reflection.Assembly.GetExecutingAssembly().Location;
            var currentAssemblyFullpath = String.Format(currentAssemblyLocation, "\\AutomationTestAssistantCore.dll");
            var additionalArguments     = BuildMsBuildAdditionalArguments(msbuildProjPath, ipAddressSettings, additionalArgs, currentAssemblyFullpath);
            var procStartInfo           = new ProcessStartInfo(MSBUILD_PATH, additionalArguments);

            procStartInfo.RedirectStandardOutput = false;
            //procStartInfo.UseShellExecute = true;
            //procStartInfo.CreateNoWindow = false;
            procStartInfo.UseShellExecute = false;
            procStartInfo.CreateNoWindow  = true;
            var proc = new Process();

            proc.StartInfo = procStartInfo;
            proc.Start();
            return(proc);
        }