Builder.Common.BuildStepCompileVSNet.Run C# (CSharp) Method

Run() public method

public Run ( ) : void
return void
        public override void Run()
        {
            m_oBuilder.Log("Compiling " + ExpandMacros(m_sProject) + "...\r\n", true);

            string arguments =
                "\"" + ExpandMacros(m_sProject) + "\" /rebuild \"" + ExpandMacros(m_sConfiguration) + "\"";

            if (!m_sProject.ToLower().EndsWith(".sln"))
                arguments += " /project \"" + ExpandMacros(m_sProject) + "\"";

            ProcessLauncher launcher = new ProcessLauncher();
            launcher.Output += new ProcessLauncher.OutputDelegate(launcher_Output);

            string output;
            int exitCode = launcher.LaunchProcess(m_oBuilder.ExpandMacros(m_oBuilder.ParameterVSPath), arguments, out output);

            if (exitCode != 0)
                throw new Exception("Failed");

            if (output.IndexOf("0 succeeded") >= 0)
                throw new Exception("Failed");
        }