143 references to MSBuildApp
Microsoft.Build.CommandLine.UnitTests (134)
CommandLineSwitches_Tests.cs (24)
30MSBuildApp.Initialize();
1189MSBuildApp.BuildProject(
1261bool nodeReuse = MSBuildApp.ProcessNodeReuseSwitch(new string[] { "false", "true" });
1272bool nodeReuse = MSBuildApp.ProcessNodeReuseSwitch(new string[] { "true", "false" });
1285string result = MSBuildApp.ExtractAnyLoggerParameter("v=diag;v=q", new string[] { "v", "verbosity" });
1301Assert.Null(MSBuildApp.ProcessWarnAsErrorSwitch(commandLineSwitches));
1325ISet<string> actualWarningsAsErrors = MSBuildApp.ProcessWarnAsErrorSwitch(commandLineSwitches);
1347ISet<string> actualWarningsAsErrors = MSBuildApp.ProcessWarnAsErrorSwitch(commandLineSwitches);
1372ISet<string> actualWarningsAsErrors = MSBuildApp.ProcessWarnAsErrorSwitch(commandLineSwitches);
1390ISet<string> actualWarningsAsErrors = MSBuildApp.ProcessWarnAsErrorSwitch(commandLineSwitches);
1459ISet<string> actualWarningsAsMessages = MSBuildApp.ProcessWarnAsMessageSwitch(commandLineSwitches);
1482MSBuildApp.ProcessBooleanSwitch(Array.Empty<string>(), defaultValue: true, resourceName: null).ShouldBeTrue();
1484MSBuildApp.ProcessBooleanSwitch(Array.Empty<string>(), defaultValue: false, resourceName: null).ShouldBeFalse();
1486MSBuildApp.ProcessBooleanSwitch(new[] { "true" }, defaultValue: false, resourceName: null).ShouldBeTrue();
1488MSBuildApp.ProcessBooleanSwitch(new[] { "false" }, defaultValue: true, resourceName: null).ShouldBeFalse();
1490Should.Throw<CommandLineSwitchException>(() => MSBuildApp.ProcessBooleanSwitch(new[] { "invalid" }, defaultValue: true, resourceName: "InvalidRestoreValue"));
1519MSBuildApp.ProcessBooleanSwitch(Array.Empty<string>(), defaultValue: true, resourceName: "InvalidNoLogoValue").ShouldBeTrue();
1520MSBuildApp.ProcessBooleanSwitch(Array.Empty<string>(), defaultValue: false, resourceName: "InvalidNoLogoValue").ShouldBeFalse();
1523MSBuildApp.ProcessBooleanSwitch(new[] { "true" }, defaultValue: false, resourceName: "InvalidNoLogoValue").ShouldBeTrue();
1524MSBuildApp.ProcessBooleanSwitch(new[] { "false" }, defaultValue: true, resourceName: "InvalidNoLogoValue").ShouldBeFalse();
1527Should.Throw<CommandLineSwitchException>(() => MSBuildApp.ProcessBooleanSwitch(new[] { "invalid" }, defaultValue: true, resourceName: "InvalidNoLogoValue"));
1566var graphBuildOptions = MSBuildApp.ProcessGraphBuildSwitch(parameters);
1604MSBuildApp.Execute([@"msbuild.exe", project, "/t:foo.bar"]).ShouldBe(MSBuildApp.ExitType.SwitchError);
XMake_Tests.cs (110)
549MSBuildApp.Execute([@"c:\bin\msbuild.exe", indicator])
550.ShouldBe(MSBuildApp.ExitType.Success);
635MSBuildApp.Execute([@"c:\bin\msbuild.exe", "-junk"]).ShouldBe(MSBuildApp.ExitType.SwitchError);
636MSBuildApp.Execute([@"msbuild.exe", "-t"]).ShouldBe(MSBuildApp.ExitType.SwitchError);
637MSBuildApp.Execute([@"msbuild.exe", "@bogus.rsp"]).ShouldBe(MSBuildApp.ExitType.InitializationError);
645MSBuildApp.ProcessVerbositySwitch("Q").ShouldBe(LoggerVerbosity.Quiet);
646MSBuildApp.ProcessVerbositySwitch("quiet").ShouldBe(LoggerVerbosity.Quiet);
647MSBuildApp.ProcessVerbositySwitch("m").ShouldBe(LoggerVerbosity.Minimal);
648MSBuildApp.ProcessVerbositySwitch("minimal").ShouldBe(LoggerVerbosity.Minimal);
649MSBuildApp.ProcessVerbositySwitch("N").ShouldBe(LoggerVerbosity.Normal);
650MSBuildApp.ProcessVerbositySwitch("normal").ShouldBe(LoggerVerbosity.Normal);
651MSBuildApp.ProcessVerbositySwitch("d").ShouldBe(LoggerVerbosity.Detailed);
652MSBuildApp.ProcessVerbositySwitch("detailed").ShouldBe(LoggerVerbosity.Detailed);
653MSBuildApp.ProcessVerbositySwitch("diag").ShouldBe(LoggerVerbosity.Diagnostic);
654MSBuildApp.ProcessVerbositySwitch("DIAGNOSTIC").ShouldBe(LoggerVerbosity.Diagnostic);
662MSBuildApp.ProcessVerbositySwitch("loquacious");
669MSBuildApp.ProcessMaxCPUCountSwitch(new[] { "1" }).ShouldBe(1);
670MSBuildApp.ProcessMaxCPUCountSwitch(new[] { "2" }).ShouldBe(2);
671MSBuildApp.ProcessMaxCPUCountSwitch(new[] { "3" }).ShouldBe(3);
672MSBuildApp.ProcessMaxCPUCountSwitch(new[] { "4" }).ShouldBe(4);
673MSBuildApp.ProcessMaxCPUCountSwitch(new[] { "8" }).ShouldBe(8);
674MSBuildApp.ProcessMaxCPUCountSwitch(new[] { "63" }).ShouldBe(63);
677MSBuildApp.ProcessMaxCPUCountSwitch(new[] { "8", "4" }).ShouldBe(4);
685MSBuildApp.ProcessMaxCPUCountSwitch(new[] { "-1" });
694MSBuildApp.ProcessMaxCPUCountSwitch(new[] { "0" });
703MSBuildApp.ProcessMaxCPUCountSwitch(new[] { "foo" });
710MSBuildApp.ParseNodeMode("1").ShouldBe(NodeMode.OutOfProcNode);
711MSBuildApp.ParseNodeMode("2").ShouldBe(NodeMode.OutOfProcTaskHostNode);
712MSBuildApp.ParseNodeMode("3").ShouldBe(NodeMode.OutOfProcRarNode);
713MSBuildApp.ParseNodeMode("8").ShouldBe(NodeMode.OutOfProcServerNode);
719MSBuildApp.ParseNodeMode("OutOfProcNode").ShouldBe(NodeMode.OutOfProcNode);
720MSBuildApp.ParseNodeMode("outofprocnode").ShouldBe(NodeMode.OutOfProcNode);
721MSBuildApp.ParseNodeMode("OUTOFPROCNODE").ShouldBe(NodeMode.OutOfProcNode);
722MSBuildApp.ParseNodeMode("OutOfProcTaskHostNode").ShouldBe(NodeMode.OutOfProcTaskHostNode);
723MSBuildApp.ParseNodeMode("outofproctaskhostnode").ShouldBe(NodeMode.OutOfProcTaskHostNode);
724MSBuildApp.ParseNodeMode("OutOfProcRarNode").ShouldBe(NodeMode.OutOfProcRarNode);
725MSBuildApp.ParseNodeMode("outofprocrarnode").ShouldBe(NodeMode.OutOfProcRarNode);
726MSBuildApp.ParseNodeMode("OutOfProcServerNode").ShouldBe(NodeMode.OutOfProcServerNode);
727MSBuildApp.ParseNodeMode("outofprocservernode").ShouldBe(NodeMode.OutOfProcServerNode);
735MSBuildApp.ParseNodeMode("4");
744MSBuildApp.ParseNodeMode("-1");
753MSBuildApp.ParseNodeMode("InvalidMode");
762MSBuildApp.ParseNodeMode("");
772MSBuildApp.ProcessMaxCPUCountSwitch(new[] { "1025" });
992MSBuildApp.SetConsoleUI();
999MSBuildApp.SetConsoleUI();
1025MSBuildApp.SetConsoleUI();
1059MSBuildApp.SetConsoleUI();
1210MSBuildApp.Execute([@"c:\bin\msbuild.exe", quotedProjectFileName]).ShouldBe(MSBuildApp.ExitType.Success);
1244MSBuildApp
1250.ShouldBe(MSBuildApp.ExitType.Success);
1680MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe(answer, StringCompareShould.IgnoreCase);
1695MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found"
1707MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found"
1719MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found"
1722MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found"
1736MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found"
1751MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found"
1765MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase);
1779MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found"
1793MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles);
1802MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.nativeproj", StringCompareShould.IgnoreCase); // "Expected test.nativeproj to be only project found"
1807MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.proj", StringCompareShould.IgnoreCase); // "Expected test.proj to be only project found"
1812MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.nativeproj", StringCompareShould.IgnoreCase); // "Expected test.nativeproj to be only project found"
1817MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.sln", StringCompareShould.IgnoreCase); // "Expected test.sln to be only solution found"
1822MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.slnx", StringCompareShould.IgnoreCase); // "Expected test.slnx to be only solution found"
1827MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.sln", StringCompareShould.IgnoreCase); // "Expected test.sln to be only solution found"
1832MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.slnx", StringCompareShould.IgnoreCase); // "Expected test.slnx to be only solution found"
1837MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.proj", StringCompareShould.IgnoreCase); // "Expected test.proj to be only project found"
1842MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.proj", StringCompareShould.IgnoreCase); // "Expected test.proj to be only project found"
1847MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.sln", StringCompareShould.IgnoreCase); // "Expected test.sln to be only solution found"
1852MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.slnx", StringCompareShould.IgnoreCase); // "Expected test.slnx to be only solution found"
1858MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.sln", StringCompareShould.IgnoreCase); // "Expected test.sln to be only solution found"
1863MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.sln", StringCompareShould.IgnoreCase); // "Expected test.sln to be only solution found"
1875MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.proj"); // "Expected test.proj to be only project found"
1889MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles);
1903MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles);
1918MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles);
1932MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles);
1946MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles);
1960MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles);
1975MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles);
1987MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles);
2001MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles);
2015MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles);
2082string actualProject = MSBuildApp.ProcessProjectSwitch(new[] { projectDirectory }, extensionsToIgnore, projectHelper.GetFiles);
2106MSBuildApp.ProcessProjectSwitch(new[] { projectDirectory }, extensionsToIgnore, projectHelper.GetFiles);
2130MSBuildApp.ProcessDistributedFileLogger(
2149MSBuildApp.ProcessDistributedFileLogger(
2168MSBuildApp.ProcessDistributedFileLogger(
2180MSBuildApp.ProcessDistributedFileLogger(
2191MSBuildApp.ProcessDistributedFileLogger(
2210MSBuildApp.ProcessDistributedFileLogger(
2223MSBuildApp.ProcessDistributedFileLogger(
2236MSBuildApp.ProcessDistributedFileLogger(
2249MSBuildApp.ProcessDistributedFileLogger(
2262MSBuildApp.ProcessDistributedFileLogger(
2273MSBuildApp.ProcessDistributedFileLogger(
2284MSBuildApp.ProcessDistributedFileLogger(
2302MSBuildApp.ProcessDistributedFileLogger(
2323MSBuildApp.ProcessDistributedFileLogger(
2358MSBuildApp.ProcessConsoleLoggerSwitch(
2368MSBuildApp.ProcessConsoleLoggerSwitch(
2382MSBuildApp.ProcessConsoleLoggerSwitch(
3141MSBuildApp.Execute([@"c:\bin\msbuild.exe", project, "/m:257 /mt"]).ShouldBe(MSBuildApp.ExitType.SwitchError);
Microsoft.Build.Engine.UnitTests (3)
MSBuild (6)