static void Main(string[] args) { if (args != null && args.Length >= 2) { CommandLineOptionsBuilder builder = new CommandLineOptionsBuilder(); CommandLineOptions options = builder.GetOptions(args); if (options.AreOptionsValid) { TargetAnalyzer analyzer = new TargetAnalyzer(); analyzer.Analyze(options.ProjectFilePath); var diagBuilder = new DiagnosticBuilder(options.ProjectFilePath, options.LogfilePath, new string[] { "Build" }); diagBuilder.BuildAndAnalyze(); Console.WriteLine(analyzer.GetReport()); } else { Console.WriteLine(options.ValidationErrorMessage); PrintUsage(); } } else { PrintUsage(); } }