121 references to MSBuildApp
Microsoft.Build.CommandLine.UnitTests (111)
CommandLineSwitches_Tests.cs (19)
29MSBuildApp.Initialize(); 1188MSBuildApp.BuildProject( 1261bool nodeReuse = MSBuildApp.ProcessNodeReuseSwitch(new string[] { "false", "true" }); 1272bool nodeReuse = MSBuildApp.ProcessNodeReuseSwitch(new string[] { "true", "false" }); 1286string result = MSBuildApp.ExtractAnyLoggerParameter("v=diag;v=q", new string[] { "v", "verbosity" }); 1302Assert.Null(MSBuildApp.ProcessWarnAsErrorSwitch(commandLineSwitches)); 1326ISet<string> actualWarningsAsErrors = MSBuildApp.ProcessWarnAsErrorSwitch(commandLineSwitches); 1348ISet<string> actualWarningsAsErrors = MSBuildApp.ProcessWarnAsErrorSwitch(commandLineSwitches); 1373ISet<string> actualWarningsAsErrors = MSBuildApp.ProcessWarnAsErrorSwitch(commandLineSwitches); 1391ISet<string> actualWarningsAsErrors = MSBuildApp.ProcessWarnAsErrorSwitch(commandLineSwitches); 1460ISet<string> actualWarningsAsMessages = MSBuildApp.ProcessWarnAsMessageSwitch(commandLineSwitches); 1483MSBuildApp.ProcessBooleanSwitch(Array.Empty<string>(), defaultValue: true, resourceName: null).ShouldBeTrue(); 1485MSBuildApp.ProcessBooleanSwitch(Array.Empty<string>(), defaultValue: false, resourceName: null).ShouldBeFalse(); 1487MSBuildApp.ProcessBooleanSwitch(new[] { "true" }, defaultValue: false, resourceName: null).ShouldBeTrue(); 1489MSBuildApp.ProcessBooleanSwitch(new[] { "false" }, defaultValue: true, resourceName: null).ShouldBeFalse(); 1491Should.Throw<CommandLineSwitchException>(() => MSBuildApp.ProcessBooleanSwitch(new[] { "invalid" }, defaultValue: true, resourceName: "InvalidRestoreValue")); 1530var graphBuildOptions = MSBuildApp.ProcessGraphBuildSwitch(parameters); 1568MSBuildApp.Execute(@"msbuild.exe " + project + " /t:foo.bar").ShouldBe(MSBuildApp.ExitType.SwitchError);
XMake_Tests.cs (92)
570MSBuildApp.Execute(@$"c:\bin\msbuild.exe {indicator} ") 571.ShouldBe(MSBuildApp.ExitType.Success); 664MSBuildApp.Execute(@"c:\bin\msbuild.exe -junk").ShouldBe(MSBuildApp.ExitType.SwitchError); 666MSBuildApp.Execute(@"msbuild.exe -t").ShouldBe(MSBuildApp.ExitType.SwitchError); 668MSBuildApp.Execute(@"msbuild.exe @bogus.rsp").ShouldBe(MSBuildApp.ExitType.InitializationError); 676MSBuildApp.ProcessVerbositySwitch("Q").ShouldBe(LoggerVerbosity.Quiet); 677MSBuildApp.ProcessVerbositySwitch("quiet").ShouldBe(LoggerVerbosity.Quiet); 678MSBuildApp.ProcessVerbositySwitch("m").ShouldBe(LoggerVerbosity.Minimal); 679MSBuildApp.ProcessVerbositySwitch("minimal").ShouldBe(LoggerVerbosity.Minimal); 680MSBuildApp.ProcessVerbositySwitch("N").ShouldBe(LoggerVerbosity.Normal); 681MSBuildApp.ProcessVerbositySwitch("normal").ShouldBe(LoggerVerbosity.Normal); 682MSBuildApp.ProcessVerbositySwitch("d").ShouldBe(LoggerVerbosity.Detailed); 683MSBuildApp.ProcessVerbositySwitch("detailed").ShouldBe(LoggerVerbosity.Detailed); 684MSBuildApp.ProcessVerbositySwitch("diag").ShouldBe(LoggerVerbosity.Diagnostic); 685MSBuildApp.ProcessVerbositySwitch("DIAGNOSTIC").ShouldBe(LoggerVerbosity.Diagnostic); 693MSBuildApp.ProcessVerbositySwitch("loquacious"); 700MSBuildApp.ProcessMaxCPUCountSwitch(new[] { "1" }).ShouldBe(1); 701MSBuildApp.ProcessMaxCPUCountSwitch(new[] { "2" }).ShouldBe(2); 702MSBuildApp.ProcessMaxCPUCountSwitch(new[] { "3" }).ShouldBe(3); 703MSBuildApp.ProcessMaxCPUCountSwitch(new[] { "4" }).ShouldBe(4); 704MSBuildApp.ProcessMaxCPUCountSwitch(new[] { "8" }).ShouldBe(8); 705MSBuildApp.ProcessMaxCPUCountSwitch(new[] { "63" }).ShouldBe(63); 708MSBuildApp.ProcessMaxCPUCountSwitch(new[] { "8", "4" }).ShouldBe(4); 716MSBuildApp.ProcessMaxCPUCountSwitch(new[] { "-1" }); 725MSBuildApp.ProcessMaxCPUCountSwitch(new[] { "0" }); 734MSBuildApp.ProcessMaxCPUCountSwitch(new[] { "foo" }); 744MSBuildApp.ProcessMaxCPUCountSwitch(new[] { "1025" }); 932MSBuildApp.SetConsoleUI(); 939MSBuildApp.SetConsoleUI(); 965MSBuildApp.SetConsoleUI(); 999MSBuildApp.SetConsoleUI(); 1150MSBuildApp.Execute(@"c:\bin\msbuild.exe " + quotedProjectFileName).ShouldBe(MSBuildApp.ExitType.Success); 1184MSBuildApp.Execute(@$"c:\bin\msbuild.exe /logger:FileLogger,""Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"";""LogFile={logFile}"" /verbosity:detailed " + quotedProjectFileName).ShouldBe(MSBuildApp.ExitType.Success); 1614MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe(answer, StringCompareShould.IgnoreCase); 1629MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found" 1641MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found" 1653MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found" 1656MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found" 1670MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found" 1685MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found" 1699MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); 1713MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found" 1727MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1736MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.nativeproj", StringCompareShould.IgnoreCase); // "Expected test.nativeproj to be only project found" 1741MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.proj", StringCompareShould.IgnoreCase); // "Expected test.proj to be only project found" 1746MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.nativeproj", StringCompareShould.IgnoreCase); // "Expected test.nativeproj to be only project found" 1751MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.sln", StringCompareShould.IgnoreCase); // "Expected test.sln to be only solution found" 1756MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.slnx", StringCompareShould.IgnoreCase); // "Expected test.slnx to be only solution found" 1761MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.sln", StringCompareShould.IgnoreCase); // "Expected test.sln to be only solution found" 1766MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.slnx", StringCompareShould.IgnoreCase); // "Expected test.slnx to be only solution found" 1771MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.proj", StringCompareShould.IgnoreCase); // "Expected test.proj to be only project found" 1776MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.proj", StringCompareShould.IgnoreCase); // "Expected test.proj to be only project found" 1781MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.sln", StringCompareShould.IgnoreCase); // "Expected test.sln to be only solution found" 1786MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.slnx", StringCompareShould.IgnoreCase); // "Expected test.slnx to be only solution found" 1792MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.sln", StringCompareShould.IgnoreCase); // "Expected test.sln to be only solution found" 1797MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.sln", StringCompareShould.IgnoreCase); // "Expected test.sln to be only solution found" 1809MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.proj"); // "Expected test.proj to be only project found" 1823MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1837MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1852MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1866MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1880MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1894MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1909MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1921MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1935MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1949MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 2016string actualProject = MSBuildApp.ProcessProjectSwitch(new[] { projectDirectory }, extensionsToIgnore, projectHelper.GetFiles); 2040MSBuildApp.ProcessProjectSwitch(new[] { projectDirectory }, extensionsToIgnore, projectHelper.GetFiles); 2064MSBuildApp.ProcessDistributedFileLogger( 2083MSBuildApp.ProcessDistributedFileLogger( 2102MSBuildApp.ProcessDistributedFileLogger( 2114MSBuildApp.ProcessDistributedFileLogger( 2125MSBuildApp.ProcessDistributedFileLogger( 2144MSBuildApp.ProcessDistributedFileLogger( 2157MSBuildApp.ProcessDistributedFileLogger( 2170MSBuildApp.ProcessDistributedFileLogger( 2183MSBuildApp.ProcessDistributedFileLogger( 2196MSBuildApp.ProcessDistributedFileLogger( 2207MSBuildApp.ProcessDistributedFileLogger( 2218MSBuildApp.ProcessDistributedFileLogger( 2236MSBuildApp.ProcessDistributedFileLogger( 2254MSBuildApp.ProcessConsoleLoggerSwitch( 2264MSBuildApp.ProcessConsoleLoggerSwitch( 2278MSBuildApp.ProcessConsoleLoggerSwitch( 2927MSBuildApp.Execute(@"c:\bin\msbuild.exe " + project + " / m:257 /mt").ShouldBe(MSBuildApp.ExitType.SwitchError);
Microsoft.Build.Engine.UnitTests (3)
Utilities_Tests.cs (3)
12using MSBuildApp = Microsoft.Build.CommandLine.MSBuildApp; 83MSBuildApp.Execute(@"c:\bin\msbuild.exe """ + inputFile.Path + 85.ShouldBe(MSBuildApp.ExitType.Success);
Microsoft.DotNet.Cli.Utils (1)
MSBuildForwardingAppWithoutLogging.cs (1)
160return Build.CommandLine.MSBuildApp.Main(arguments);
MSBuild (6)
MSBuildClientApp.cs (5)
37public static MSBuildApp.ExitType Execute(string commandLine, CancellationToken cancellationToken) 58public static MSBuildApp.ExitType Execute( 77return MSBuildApp.Execute(commandLine); 81Enum.TryParse(exitResult.MSBuildAppExitTypeString, out MSBuildApp.ExitType MSBuildAppExitType)) 88return MSBuildApp.ExitType.MSBuildClientFailure;
XMake.cs (1)
2436return terminalLoggerParameters?.Length > 0 ? MSBuildApp.AggregateParameters(string.Empty, terminalLoggerParameters) : string.Empty;