205 references to StdErr
ArgumentForwarding.Tests (3)
ArgumentForwardingTests.cs (3)
176Console.WriteLine($"STDERR: {commandResult.StdErr}"); 178commandResult.ExitCode.Should().Be(0, $"STDOUT: {commandResult.StdOut} STDERR: {commandResult.StdErr}"); 200Console.WriteLine(commandResult.StdErr);
dotnet (4)
BuildServer\RazorServer.cs (1)
54result.StdErr));
BuildServer\VBCSCompilerServer.cs (1)
74errors.Add(result.StdErr);
FilePermissionSetter.cs (1)
42throw new FilePermissionSettingException(result.StdErr);
NugetPackageDownloader\FirstPartyNuGetPackageSigningVerifier.cs (1)
86commandOutput = commandResult.StdOut + Environment.NewLine + commandResult.StdErr;
dotnet.Tests (128)
CommandTests\CommandIntegrationTests.cs (2)
14cmd.StdErr.Should().BeEmpty(); 22cmd.StdErr.Should().BeEmpty();
CommandTests\Help\GivenThatIWantToShowHelpForDotnetCommand.cs (2)
89cmd.StdErr.Should().Contain(string.Format(CliCommandStrings.CommandDoesNotExist, "invalid")); 102cmd.StdErr.Should().Contain(string.Format(CliCommandStrings.CommandDoesNotExist, command));
CommandTests\Pack\PackTests.cs (1)
335result.StdErr.Should().Contain("Required argument missing for option: '--version'.");
CommandTests\Package\Add\GivenDotnetPackageAdd.cs (2)
32cmd.StdErr.Should().BeEmpty(); 290cmd.StdErr.Should().BeEmpty();
CommandTests\Package\Remove\GivenDotnetRemovePackage.cs (2)
63cmd.StdErr.Should().Be(CliStrings.RequiredCommandNotPassed); 86remove.StdErr.Should().BeEmpty();
CommandTests\Reference\Add\GivenDotnetAddReference.cs (20)
120cmd.StdErr.Should().BeVisuallyEquivalentTo($@"{string.Format(CliStrings.UnrecognizedCommandOrArgument, "two")} 135cmd.StdErr.Should().Be(string.Format(CliStrings.CouldNotFindProjectOrDirectory, projName)); 163cmd.StdErr.Should().Be(string.Format(CliStrings.ProjectIsInvalid, projName)); 177cmd.StdErr.Should().Be(string.Format(CliStrings.MoreThanOneProjectInDirectory, workingDir + Path.DirectorySeparatorChar)); 190cmd.StdErr.Should().Be(string.Format(CliStrings.CouldNotFindAnyProjectInDirectory, setup.TestRoot + Path.DirectorySeparatorChar)); 211cmd.StdErr.Should().Contain(string.Format( 214cmd.StdErr.Should().NotContain("Microsoft.DotNet.Cli.Utils.GracefulException"); 229cmd.StdErr.Should().BeEmpty(); 247cmd.StdErr.Should().BeEmpty(); 549cmd.StdErr.Should().BeEmpty(); 565cmd.StdErr.Should().Be(string.Format(CliStrings.CouldNotFindProjectOrDirectory, "IDoNotExist.csproj")); 580cmd.StdErr.Should().Be(string.Format(CliStrings.CouldNotFindProjectOrDirectory, "IDoNotExist.csproj")); 596cmd.StdErr.Should().BeEmpty(); 614cmd.StdErr.Should().BeEmpty(); 670cmd.StdErr.Should().Be(string.Format(CliStrings.ProjectDoesNotTargetFramework, setup.LibCsprojPath, framework)); 696cmd.StdErr.Should().MatchRegex(ProjectNotCompatibleErrorMessageRegEx); 697cmd.StdErr.Should().MatchRegex(" - net45"); 713result.StdErr.Should().BeEmpty(); 729result.StdErr.Should().Be(string.Format(CliStrings.CouldNotFindAnyProjectInDirectory, reference)); 745result.StdErr.Should().Be(string.Format(CliStrings.MoreThanOneProjectInDirectory, reference));
CommandTests\Reference\List\GivenDotnetListReference.cs (6)
65cmd.StdErr.Should().Be(CliStrings.RequiredCommandNotPassed); 74cmd.StdErr.Should().BeVisuallyEquivalentTo($@"{string.Format(CliStrings.UnrecognizedCommandOrArgument, "two")} 90cmd.StdErr.Should().Be(string.Format(CliStrings.CouldNotFindProjectOrDirectory, projName)); 119cmd.StdErr.Should().Be(string.Format(CliStrings.ProjectIsInvalid, projName)); 133cmd.StdErr.Should().Be(string.Format(CliStrings.MoreThanOneProjectInDirectory, workingDir + Path.DirectorySeparatorChar)); 146cmd.StdErr.Should().Be(string.Format(CliStrings.CouldNotFindAnyProjectInDirectory, setup.TestRoot + Path.DirectorySeparatorChar));
CommandTests\Reference\Remove\GivenDotnetRemoveP2P.cs (9)
155cmd.StdErr.Should().Be(CliStrings.RequiredCommandNotPassed); 164cmd.StdErr.Should().BeVisuallyEquivalentTo($@"{string.Format(CliStrings.UnrecognizedCommandOrArgument, "two")} 180cmd.StdErr.Should().Be(string.Format(CliStrings.CouldNotFindProjectOrDirectory, projName)); 209cmd.StdErr.Should().Be(string.Format(CliStrings.ProjectIsInvalid, projName)); 223cmd.StdErr.Should().Be(string.Format(CliStrings.MoreThanOneProjectInDirectory, workingDir + Path.DirectorySeparatorChar)); 236cmd.StdErr.Should().Be(string.Format(CliStrings.CouldNotFindAnyProjectInDirectory, setup.TestRoot + Path.DirectorySeparatorChar)); 548result.StdErr.Should().BeEmpty(); 565result.StdErr.Should().Be(string.Format(CliStrings.CouldNotFindAnyProjectInDirectory, Path.Combine(setup.TestRoot, reference))); 582result.StdErr.Should().Be(string.Format(CliStrings.MoreThanOneProjectInDirectory, Path.Combine(setup.TestRoot, reference)));
CommandTests\Run\GivenDotnetRunBuildsCsProj.cs (12)
403cmd.StdErr.Should().BeEmpty(); 424cmd.StdErr.Should().BeEmpty(); 444cmd.StdErr.Should().BeEmpty(); 464cmd.StdErr.Should().BeEmpty(); 484cmd.StdErr.Should().Contain("DoesNotExist"); 504cmd.StdErr.Should().BeEmpty(); 524cmd.StdErr.Should().BeEmpty(); 543cmd.StdErr.Should().BeEmpty(); 562cmd.StdErr.Should().BeEmpty(); 615cmd.StdErr.Should().BeEmpty(); 634cmd.StdErr.Should().BeEmpty(); 1020var stderr = result.StdErr;
CommandTests\Run\GivenDotnetRunBuildsVbProj.cs (2)
112cmd.StdErr.Should().BeEmpty(); 132cmd.StdErr.Should().BeEmpty();
CommandTests\Run\RunFileTests.cs (2)
4230fileBasedResult.StdErr.Should().Be(projectBasedResult.StdErr);
CommandTests\Solution\Add\GivenDotnetSlnAdd.cs (20)
74cmd.StdErr.Should().Be(CliStrings.RequiredCommandNotPassed); 85cmd.StdErr.Should().BeVisuallyEquivalentTo($@"{string.Format(CliStrings.UnrecognizedCommandOrArgument, "two.sln")} 105cmd.StdErr.Should().Be(string.Format(CliStrings.CouldNotFindSolutionOrDirectory, solutionName)); 126cmd.StdErr.Should().Match(string.Format(CliStrings.InvalidSolutionFormatString, Path.Combine(projectDirectory, $"InvalidSolution{solutionExtension}"), "*")); 153cmd.StdErr.Should().Match(string.Format(CliStrings.InvalidSolutionFormatString, solutionPath, "*")); 173cmd.StdErr.Should().Be(CliStrings.SpecifyAtLeastOneProjectToAdd); 192cmd.StdErr.Should().Be(string.Format(CliStrings.SolutionDoesNotExist, solutionPath + Path.DirectorySeparatorChar)); 211cmd.StdErr.Should().Be(string.Format(CliStrings.MoreThanOneSolutionInDirectory, projectDirectory + Path.DirectorySeparatorChar)); 374cmd.StdErr.Should().Contain( 403cmd.StdErr.Should().Contain( 457cmd.StdErr.Should().BeEmpty(); 564cmd.StdErr.Should().BeEmpty(); 637cmd.StdErr.Should().Match(string.Format(CliStrings.InvalidProjectWithExceptionMessage, '*', '*')); 733cmd.StdErr.Should().Be(string.Format(CliStrings.CouldNotFindProjectOrDirectory, "idonotexist.csproj")); 757cmd.StdErr.Should().BeVisuallyEquivalentTo("has an unknown project type and cannot be added to the solution file. Contact your SDK provider for support."); 792cmd.StdErr.Should().BeEmpty(); 822cmd.StdErr.Should().Be( 850cmd.StdErr.Should().BeEmpty(); 1097cmd.StdErr.Should().Be(CliCommandStrings.SolutionFolderAndInRootMutuallyExclusive); 1300cmd.StdErr.Should().BeVisuallyEquivalentTo(
CommandTests\Solution\List\GivenDotnetSlnList.cs (7)
52cmd.StdErr.Should().Be(CliStrings.RequiredCommandNotPassed); 63cmd.StdErr.Should().BeVisuallyEquivalentTo($@"{string.Format(CliStrings.UnrecognizedCommandOrArgument, "two.sln")} 83cmd.StdErr.Should().Be(string.Format(CliStrings.CouldNotFindSolutionOrDirectory, solutionName)); 101cmd.StdErr.Should().Contain( 127cmd.StdErr.Should().Contain( 147cmd.StdErr.Should().Be(string.Format(CliStrings.SolutionDoesNotExist, solutionDir + Path.DirectorySeparatorChar)); 165cmd.StdErr.Should().Be(string.Format(CliStrings.MoreThanOneSolutionInDirectory, projectDirectory + Path.DirectorySeparatorChar));
CommandTests\Solution\Remove\GivenDotnetSlnRemove.cs (11)
51cmd.StdErr.Should().BeVisuallyEquivalentTo($@"{string.Format(CliStrings.UnrecognizedCommandOrArgument, "two.sln")} 65cmd.StdErr.Should().Be(CliStrings.RequiredCommandNotPassed); 86cmd.StdErr.Should().Be(string.Format(CliStrings.CouldNotFindSolutionOrDirectory, solutionName)); 107cmd.StdErr.Should().Match(string.Format(CliStrings.InvalidSolutionFormatString, Path.Combine(projectDirectory, $"InvalidSolution{solutionExtension}"), "*")); 133cmd.StdErr.Should().Match(string.Format(CliStrings.InvalidSolutionFormatString, solutionPath, "*")); 153cmd.StdErr.Should().Be(CliStrings.SpecifyAtLeastOneProjectToRemove); 172cmd.StdErr.Should().Be(string.Format(CliStrings.SolutionDoesNotExist, solutionPath + Path.DirectorySeparatorChar)); 191cmd.StdErr.Should().Be(string.Format(CliStrings.MoreThanOneSolutionInDirectory, projectDirectory + Path.DirectorySeparatorChar)); 449cmd.StdErr.Should().Be( 473cmd.StdErr.Should().Be( 689cmd.StdErr.Should().BeVisuallyEquivalentTo(
CommandTests\Test\GivenDotnetTestBuildsAndDiscoversTests.cs (1)
144result.StdErr.Should().Contain(string.Format(CliCommandStrings.CmdUnsupportedVSTestTestApplicationsDescription, "AnotherTestProject.csproj"));
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestfromCsproj.cs (1)
457result.StdOut + Environment.NewLine + result.StdErr);
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestFromDll.cs (1)
105result.StdErr.Should().StartWith("Invalid platform type: wrongArchitecture. Valid platform types are ");
CommandTests\Test\GivenDotnetTestBuildsAndRunsTests.cs (6)
261result.StdErr.Should().Contain(string.Format(CliCommandStrings.CmdUnsupportedVSTestTestApplicationsDescription, "AnotherTestProject.csproj")); 281result.StdErr.Should().Contain(string.Format(CliCommandStrings.CmdUnsupportedVSTestTestApplicationsDescription, "AnotherTestProject.csproj")); 301result.StdErr.Should().Contain(CliCommandStrings.CmdNoProjectOrSolutionFileErrorDescription); 321result.StdErr.Should().Contain(CliCommandStrings.CmdNoProjectOrSolutionFileErrorDescription); 462result.StdErr.Should().MatchRegex(""" 466result.StdErr.Should().Contain("System.InvalidOperationException: A test session start event was received without a corresponding test session end.");
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestsWithDifferentOptions.cs (5)
108result.StdErr.Should().Contain(string.Format(CliCommandStrings.CmdInvalidProjectFileExtensionErrorDescription, invalidProjectPath)); 148result.StdErr.Should().Contain(string.Format(CliCommandStrings.CmdInvalidSolutionFileExtensionErrorDescription, invalidSolutionPath)); 169result.StdErr.Should().Contain(CliCommandStrings.CmdMultipleBuildPathOptionsErrorDescription); 189result.StdErr.Should().Contain(string.Format(CliCommandStrings.CmdNonExistentFileErrorDescription, fullProjectPath)); 209result.StdErr.Should().Contain(string.Format(CliCommandStrings.CmdNonExistentFileErrorDescription, fullSolutionPath));
CommandTests\Test\TestCommandValidationTests.cs (3)
40result.StdErr.Should().Contain(expectedErrorStart); 66result.StdErr.Should().Contain("Specifying a directory for 'dotnet test' should be via '--project' or '--solution'."); 94result.StdErr.Should().Contain("Specifying dlls or executables for 'dotnet test' should be via '--test-modules'.");
CommandTests\Tool\Install\ToolInstallGlobalOrToolPathCommandTests.cs (9)
941result.StdErr.Should().Contain("You are running the 'tool install' operation with an 'HTTP' source: http://test.example.com/nuget"); 942result.StdErr.Should().Contain("NuGet requires HTTPS sources"); 943result.StdErr.Should().Contain("allowInsecureConnections"); 968result.StdErr.Should().Contain("You are running the 'tool install' operation with an 'HTTP' source: http://test.example.com/nuget"); 969result.StdErr.Should().Contain("NuGet requires HTTPS sources"); 970result.StdErr.Should().Contain("allowInsecureConnections"); 996result.StdErr.Should().NotContain("You are running the 'tool install' operation with an 'HTTP' source:"); 997result.StdErr.Should().NotContain("NuGet requires HTTPS sources"); 999result.StdErr.Should().Contain("Unable to load the service index");
GivenThatTheUserIsRunningDotNetForTheFirstTime.cs (3)
111_fixture.FirstDotnetVerbUseCommandResult.StdErr 130_fixture.FirstDotnetVerbUseCommandResult.StdErr 191result.StdErr
PackagedCommandTests.cs (1)
248result.StdErr.Should().Contain(LocalizableStrings.NoExecutableFoundMatchingCommandErrorMessage);
dotnet-MsiInstallation.Tests (5)
Framework\VirtualMachine.cs (1)
354StdErr = result.StdErr,
Framework\VMControl.cs (1)
81if (result.ExitCode != 6 && !result.StdErr.Contains("The handle is invalid"))
WorkloadSetTests.cs (1)
340searchVersionResult.StdErr.Should().Contain($"No workload versions found for SDK feature band {new SdkFeatureBand(SdkInstallerVersion)}");
WorkloadSetTests2.cs (2)
42result.StdErr.Should().Contain("FileNotFoundException"); 43result.StdErr.Should().Contain(versionToUpdateTo);
dotnet-new.IntegrationTests (29)
DotnetNewInstallTests.Approval.cs (4)
22return Verify(commandResult.StdErr) 61return Verify(commandResult.StdErr) 188return Verify(commandResult.StdErr); 219return Verify(commandResult.StdErr)
DotnetNewInstantiateTests.Approval.cs (17)
24return Verify(commandResult.StdErr); 40return Verify(commandResult.StdErr); 56return Verify(commandResult.StdErr); 77return Verify(commandResult.StdErr); 98return Verify(commandResult.StdErr) 126return Verify(commandResult.StdErr); 146return Verify(commandResult.StdErr); 164return Verify(commandResult.StdErr); 182return Verify(commandResult.StdErr); 200return Verify(commandResult.StdErr); 218return Verify(commandResult.StdErr); 241return Verify(commandResult.StdErr) 449return Verify(commandResult.StdErr) 537return Verify(commandResult.StdErr) 562return Verify(commandResult.StdErr) 639return Verify(commandResult.StdErr); 655return Verify(commandResult.StdErr);
DotnetNewInstantiateTests.cs (2)
366cmd.StdErr.Should().StartWith("No templates or subcommands found"); 441cmd.StdErr.Should().StartWith("No templates or subcommands found matching: 'c'.");
DotnetNewListTests.Approval.cs (1)
108return Verify(commandResult.StdErr);
DotnetNewSearchTests.Approval.cs (1)
21return Verify(commandResult.StdErr)
DotnetNewTests.cs (1)
79return Verify(commandResult.StdErr)
Extensions.cs (1)
12return "StdErr:" + Environment.NewLine + commandResult.StdErr + Environment.NewLine + "StdOut:" + Environment.NewLine + commandResult.StdOut;
PostActionTests.Approval.cs (2)
229return Verify(commandResult.StdOut + Environment.NewLine + commandResult.StdErr); 250return Verify(commandResult.StdOut + Environment.NewLine + commandResult.StdErr)
Microsoft.DotNet.ApiCompat.IntegrationTests (7)
CompatibleFrameworkInPackageValidatorIntegrationTests.cs (2)
60Assert.Equal(string.Empty, result.StdErr); 101Assert.Equal(string.Empty, result.StdErr);
Task\ValidatePackageTargetIntegrationTests.cs (5)
165Assert.Equal(string.Empty, result.StdErr); 207Assert.Equal(string.Empty, result.StdErr); 248Assert.Equal(string.Empty, result.StdErr); 277Assert.Equal(string.Empty, result.StdErr); 301Assert.Empty(result.StdErr);
Microsoft.NET.Build.Tests (16)
GivenThatWeWantToFloatWarningLevels.cs (8)
59buildResult.StdErr.Should().Be(string.Empty); 103buildResult.StdErr.Should().Be(string.Empty); 148buildResult.StdErr.Should().Be(string.Empty); 158buildResult.StdErr.Should().Be(string.Empty); 204buildResult.StdErr.Should().Be(string.Empty, "If this test fails when updating to a new TFM, you need to update _PreviewAnalysisLevel and _LatestAnalysisLevel in Microsoft.NET.SDK.Analyzers.Targets"); 251buildResult.StdErr.Should().Be(string.Empty); 347buildResult.StdErr.Should().Be(string.Empty); 366buildResult.StdErr.Should().Be(string.Empty);
GivenThatWeWantToUsePlatformAnalyzers.cs (8)
56buildResult.StdErr.Should().Be(string.Empty); 102buildResult.StdErr.Should().Be(string.Empty); 148buildResult.StdErr.Should().Be(string.Empty); 194buildResult.StdErr.Should().Be(string.Empty); 240buildResult.StdErr.Should().Be(string.Empty); 325buildResult.StdErr.Should().Be(string.Empty); 371buildResult.StdErr.Should().Be(string.Empty); 417buildResult.StdErr.Should().Be(string.Empty);
Microsoft.NET.TestFramework (13)
Assertions\CommandResultAssertions.cs (10)
115_commandResult.StdErr.Should().NotBeNullOrEmpty(AppendDiagnosticsTo("Command did not output anything to StdErr.")); 121_commandResult.StdErr.Should().NotBeNull() 122.And.Be(expectedOutput, AppendDiagnosticsTo($"Command did not output the expected output to StdErr.{Environment.NewLine}Expected: {expectedOutput}{Environment.NewLine}Actual: {_commandResult.StdErr}"), StringComparison.Ordinal); 128_commandResult.StdErr.Should().NotBeNull() 135var lines = _commandResult.StdErr?.Split(new[] { Environment.NewLine }, StringSplitOptions.None); 145_commandResult.StdErr.Should().NotBeNull() 152_commandResult.StdErr.Should().NotBeNull(); 153Regex.Match(_commandResult.StdErr ?? string.Empty, pattern, options).Success.Should().BeTrue(AppendDiagnosticsTo($"Matching the command error output failed. Pattern: {pattern}{Environment.NewLine}")); 165_commandResult.StdErr.Should().BeNullOrEmpty(AppendDiagnosticsTo("Expected command to not output to stderr but it was not:")); 177$"StdErr:{Environment.NewLine}{_commandResult.StdErr}{Environment.NewLine}"; ;
Commands\MSBuildCommand.cs (1)
141var error = command.StdErr?.ToString();
Commands\TestCommand.cs (2)
196if (!string.IsNullOrEmpty(result.StdErr)) 200log.WriteLine(result.StdErr);