/// <summary>Builds all projects in the "samples" repository.</summary> private void BuildSamples() { // build all the samples projects. TraceSource.TraceEvent(TraceEventType.Information, "Building the samples"); foreach (string csproj in Directory.GetFiles(SamplesRepository.WorkingDirectory, "*.csproj", SearchOption.AllDirectories)) { Project project = new Project(csproj); project.SetProperty("Configuration", "Release"); TraceSource.TraceEvent(TraceEventType.Information, "Building {0}", project.GetName()); bool success = project.Build("Build", new[] { new ConsoleLogger(LoggerVerbosity.Quiet) }); if (!success) { TraceSource.TraceEvent(TraceEventType.Error, "Building {0} FAILED", project.GetName()); } project.Build("Clean"); TraceSource.TraceEvent(TraceEventType.Information, "Building {0} succeeded", project.GetName()); } }