title: Try to Automate the Build Process for C# Solution through user click
body: <p>I tried to establish a process through a click button where I can do following activities.</p>
  
  <p>Objective</p>
  
  <ol>
  <li>Download the latest code from SVN.</li>
  <li>Build 2 set of Codes to create dlls and exe-
    (a)Web application in Release mode
    (b)Standalone application in debug mode</li>
  <li>Then Replace some values of keys inside config files.</li>
  <li>Then Place them to particular location.</li>
  </ol>
  
  <p>Steps followed so far</p>
  
  <p>Created demo.bat file which will build exe and dlls for Standalone as shown below</p>
  
  <hr>
  
  <pre><code>REM * ============================Starting Setup for Standalone======================================
  SET Folder= C:\Automating\Application\Source\StandaloneApp\
  
  cd %Folder%App1
  msbuild /property:Configuration=Debug App1.csproj /t:clean /t:build
  
  cd %Folder%App2
  msbuild /property:Configuration=Debug App2.csproj /t:clean /t:build
  
  del /F /S /Q /A %Folder%Setup\*.*
  
  XCOPY %Folder%App1\bin\Debug\*.* %Folder%Setup\*.* /S /Y /F /Q
  XCOPY %Folder%App2\bin\Debug\*.* %Folder%Setup\*.* /S /Y /F /Q
  </code></pre>
  
  <p>Created Another bat file demo1.bat to change command prompt to VS2010 cmd prompt</p>
  
  <hr>
  
  <pre><code>%comspec% /k ""c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"" x86
  %comspec% /k ""C:\Automating\BuildAuto\BuildAutomation\demo.bat""
  </code></pre>
  
  <p>Created one more cmd files to download from svn</p>
  
  <hr>
  
  <pre><code>TortoiseProc.exe /command:export /URL:[URL path] /Path:"C:/Automating/Demo"
  </code></pre>
  
  <p>Finally A web application where from user can click button to download as per svnExport.bat and build the downloaded code as per <code>demo1.bat</code>. </p>
  
  <hr>
  
  <pre><code>protected void Button2_Click(object sender, EventArgs e) {
   ProcessStartInfo psi = new ProcessStartInfo(@"C:\AutomatingPOC\BuildAuto\BuildAutomation\demo1.bat");
              psi.UseShellExecute = false;
              psi.RedirectStandardOutput = false;
              psi.CreateNoWindow = false;
              Process.Start(psi);
  }
  </code></pre>
  
  <p>Downloading event is working correctly, but build is not working. I need help on how can I build the code</p>