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):
var props = new Dictionary<string, string>();
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<ILogger>() { logger };
parms.DetailedSummary = true;
var result = buildManager.Build(parms, request);
Problem is on the last line, this call never ends (I've waited for an hour).
I've also tried different approach, just trying to build one project:
var logger = new FileLogger() { Parameters = @"logfile=C:\temp\build.log" };
var projectInstance = new ProjectInstance(solutionFullPath);
projectInstance.SetProperty("Configuration", "Release");
projectInstance.Build(new List<ILogger>() { logger });
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.
I've reached the dead end, don't know what to check, don't know what to do.
Does anyone have any advice / solution to this problem? I would really appretiate any advice leading to solution of my problem.