title: Building the solution from code using BuildManager.Build()
body: <p>I've tried to create a build server app, that will get the source code and builds it into the executables and DLLs. My solution is quite big containing multiple projects depending on other projects from the same solution. Build in VS lasts in the Release configuration approx. 10mins. So probably the only way how to build it is to build them as one solution. Here is the code that I'm running (as accurate as possible, I'm trying to recover it):</p>
  
  <pre><code>var props = new Dictionary&lt;string, string&gt;();
  props["Configuration"] = "Release";
  
  var request = new BuildRequestData(solutionFullPath, props, null, new string[] { "Build" }, null);
  var parms = new BuildParameters();
  var buildManager = BuildManager.DefaultBuildManager;
  var logger = new FileLogger() { Parameters = @"logfile=C:\temp\build.log" };    
  
  parms.Loggers = new List&lt;ILogger&gt;() { logger };
  parms.DetailedSummary = true;
  
  var result = buildManager.Build(parms, request);
  </code></pre>
  
  <p>Problem is on the last line, this call never ends (I've waited for an hour).</p>
  
  <p>I've also tried different approach, just trying to build one project:</p>
  
  <pre><code>var logger = new FileLogger() { Parameters = @"logfile=C:\temp\build.log" };
  var projectInstance = new ProjectInstance(solutionFullPath);
  
  projectInstance.SetProperty("Configuration", "Release");
  projectInstance.Build(new List&lt;ILogger&gt;() { logger });
  </code></pre>
  
  <p>The result was the same though. The process is running and using more and more RAM (the increase in usage is quite slow 1MB / 5-10sec). After one hour it was approx. 0.5GB of size in memory. When I stop it before the Build() method and run it, no new process is created in Task Manager, so it is probably not calling the msbuild.exe. Log file is created, but there is not a single line, it has exactly zero bytes. No bin or obj directories are created, everything looks like there is no change by the Build() method. </p>
  
  <p>I've reached the dead end, don't know what to check, don't know what to do.</p>
  
  <p>Does anyone have any advice / solution to this problem? I would really appretiate any advice leading to solution of my problem.</p>