1 write to Error
Microsoft.DotNet.Cli.Utils (1)
Reporter.cs (1)
101Error = CommandLoggingContext.ErrorEnabled ? s_errorReporter : NullReporter;
195 references to Error
dotnet (71)
BuildServer\BuildServerProvider.cs (1)
21private readonly IReporter _reporter = reporter ?? Reporter.Error;
Commands\BuildServer\Shutdown\BuildServerShutdownCommand.cs (1)
52_errorReporter = reporter ?? Reporter.Error;
Commands\Clean\FileBasedAppArtifacts\CleanFileBasedAppArtifactsCommand.cs (2)
41Reporter.Error.WriteLine(string.Format(CliCommandStrings.CleanFileBasedAppArtifactsErrorRemovingFolder, folder, ex.Message).Red()); 67Reporter.Error.WriteLine(string.Format(CliCommandStrings.CleanFileBasedAppArtifactsDirectoryNotFound, directory.FullName).Yellow());
Commands\Help\HelpCommand.cs (1)
97Reporter.Error.WriteLine(
Commands\New\PostActions\DotnetAddPostActionProcessor.cs (13)
48Reporter.Error.WriteLine(CliCommandStrings.PostAction_AddReference_Error_ActionMisconfigured); 58Reporter.Error.WriteLine(CliCommandStrings.PostAction_AddReference_Error_UnresolvedProjFile); 59Reporter.Error.WriteLine(CliCommandStrings.PostAction_AddReference_Error_ProjFileListHeader); 62Reporter.Error.WriteLine(string.Format("\t{0}", projectFile)); 76Reporter.Error.WriteLine(CliCommandStrings.PostAction_AddReference_Error_UnresolvedProjFile); 118Reporter.Error.WriteLine(CliCommandStrings.PostAction_AddReference_Error_ActionMisconfigured); 124Reporter.Error.WriteLine(CliCommandStrings.PostAction_AddReference_Error_ActionMisconfigured); 144Reporter.Error.WriteLine(string.Format(CliCommandStrings.PostAction_AddReference_Error_FrameworkNotSupported, referenceToAdd)); 149Reporter.Error.WriteLine(string.Format(CliCommandStrings.PostAction_AddReference_Error_UnsupportedRefType, referenceType)); 173Reporter.Error.WriteLine(CliCommandStrings.PostAction_AddReference_Failed); 179Reporter.Error.WriteLine(string.Format(CliCommandStrings.PostAction_AddReference_AddPackageReference_Failed, e.Message)); 196Reporter.Error.WriteLine(CliCommandStrings.PostAction_AddReference_Failed); 202Reporter.Error.WriteLine(string.Format(CliCommandStrings.PostAction_AddReference_AddProjectReference_Failed, e.Message));
Commands\New\PostActions\DotnetRestorePostActionProcessor.cs (3)
36Reporter.Error.WriteLine(string.Format(CliCommandStrings.PostAction_Restore_Error_FailedToDetermineProjectToRestore)); 55Reporter.Error.WriteLine(CliCommandStrings.PostAction_Restore_Failed); 65Reporter.Error.WriteLine(string.Format(CliCommandStrings.PostAction_Restore_RestoreFailed, e.Message));
Commands\New\PostActions\DotnetSlnPostActionProcessor.cs (6)
73Reporter.Error.WriteLine(CliCommandStrings.PostAction_AddProjToSln_Error_NoSolutionFile); 83Reporter.Error.WriteLine(CliCommandStrings.PostAction_AddProjToSln_Error_NoProjectsToAdd); 89Reporter.Error.WriteLine(CliCommandStrings.PostAction_AddProjToSln_Error_NoProjectsToAdd); 98Reporter.Error.WriteLine(CliCommandStrings.PostAction_AddProjToSln_Error_BothInRootAndSolutionFolderSpecified); 120Reporter.Error.WriteLine(CliCommandStrings.PostAction_AddProjToSln_Failed_NoReason); 131Reporter.Error.WriteLine(string.Format(CliCommandStrings.PostAction_AddProjToSln_Failed, e.Message));
Commands\Reference\Add\ReferenceAddCommand.cs (3)
45Reporter.Error.Write(GetProjectNotCompatibleWithFrameworksDisplayString( 58Reporter.Error.WriteLine(string.Format( 69Reporter.Error.Write(GetProjectNotCompatibleWithFrameworksDisplayString(@ref, [frameworkString]));
Commands\Run\CSharpCompilerCommand.cs (2)
141Reporter.Error.WriteLine("Error: Compiler server reports a different hash version than the SDK.".Red()); 151Reporter.Error.WriteLine($"Warning: Compiler server returned unexpected response: {response.GetType().Name}".Yellow());
Commands\Run\RunCommand.cs (5)
236Reporter.Error.WriteLine(string.Format(CliCommandStrings.RunCommandExceptionCouldNotApplyLaunchSettings, profileName, applyResult.FailureReason).Bold().Red()); 245Reporter.Error.WriteLine(string.Format(CliCommandStrings.RunCommandExceptionCouldNotApplyLaunchSettings, profileName).Bold().Red()); 246Reporter.Error.WriteLine(ex.Message.Bold().Red()); 294Reporter.Error.WriteLine(string.Format(CliCommandStrings.RunCommandExceptionCouldNotLocateALaunchSettingsFile, launchProfile, $""" 330Reporter.Error.WriteLine();
Commands\Run\VirtualProjectBuildingCommand.cs (1)
381Reporter.Error.WriteLine(CommandLoggingContext.IsVerbose ?
Commands\Solution\Add\SolutionAddCommand.cs (2)
156Reporter.Error.WriteLine(string.Format(CliStrings.InvalidProjectWithExceptionMessage, fullProjectPath, ex.Message)); 207Reporter.Error.WriteLine(CliStrings.UnsupportedProjectType, fullProjectPath);
Commands\Test\MTP\MSBuildHandler.cs (3)
52Reporter.Error.WriteLine(string.Format(CliCommandStrings.CmdMSBuildProjectsPropertiesErrorDescription, msBuildExitCode)); 83Reporter.Error.WriteLine(message); 112Reporter.Error.WriteLine(
Commands\Test\MTP\SolutionAndProjectUtility.cs (1)
404Reporter.Error.WriteLine(string.Format(CliCommandStrings.RunCommandExceptionCouldNotApplyLaunchSettings, profileName, result.FailureReason).Bold().Red());
Commands\Test\MTP\TestApplication.cs (1)
383Reporter.Error.WriteLine(messageBuilder.ToString());
Commands\Test\MTP\TestApplicationActionQueue.cs (1)
73Reporter.Error.WriteLine(string.Format(CliCommandStrings.ErrorRunningTestModule, module.RunProperties?.Command, module.RunProperties?.Arguments, exAsString));
Commands\Test\MTP\ValidationUtility.cs (3)
120Reporter.Error.WriteLine(string.Format(CliCommandStrings.CmdInvalidSolutionFileExtensionErrorDescription, path)); 138Reporter.Error.WriteLine(string.Format(CliCommandStrings.CmdInvalidProjectFileExtensionErrorDescription, path)); 149Reporter.Error.WriteLine(string.Format(CliCommandStrings.CmdNonExistentFileErrorDescription, Path.GetFullPath(filePath)));
Commands\Tool\Execute\ToolExecuteCommand.cs (3)
74Reporter.Error.WriteLine(restoreResult.Message.Red()); 103Reporter.Error.WriteLine(CliCommandStrings.ToolDownloadCanceled.Red().Bold()); 108Reporter.Error.WriteLine(CliCommandStrings.ToolDownloadNeedsConfirmation.Red().Bold());
Commands\Tool\Install\ProjectRestorer.cs (1)
17private readonly IReporter _errorReporter = reporter ?? Reporter.Error;
Commands\Tool\List\ToolListGlobalOrToolPathCommand.cs (1)
23private readonly IReporter _errorReporter = reporter ?? Reporter.Error;
Commands\Tool\Restore\ToolRestoreCommand.cs (1)
62_errorReporter = reporter ?? Reporter.Error;
Commands\Tool\Uninstall\ToolUninstallGlobalOrToolPathCommand.cs (1)
27private readonly IReporter _errorReporter = reporter ?? Reporter.Error;
Commands\Workload\Search\WorkloadSearchVersionsCommand.cs (2)
93Utils.Reporter.Error.WriteLine(string.Format(CliCommandStrings.NoWorkloadVersionsFound, new SdkFeatureBand(_sdkVersion))); 185Utils.Reporter.Error.WriteLine(string.Format(CliCommandStrings.NoWorkloadVersionsFound, featureBand));
Extensions\ParseResultExtensions.cs (1)
113Reporter.Error.WriteLine(CliStrings.RequiredCommandNotPassed.Red());
NugetPackageDownloader\NuGetConsoleLogger.cs (2)
62Reporter.Error.WriteLine($"[NuGet Manager] [Error] {data}"); 87Reporter.Error.WriteLine($"[NuGet Manager] [Warning] {data}");
Parser.cs (5)
269Reporter.Error.WriteLine(CommandLoggingContext.IsVerbose ? 275Reporter.Error.WriteLine(CommandLoggingContext.IsVerbose ? 282Reporter.Error.WriteLine(CommandLoggingContext.IsVerbose ? 288Reporter.Error.Write("Unhandled exception: ".Red().Bold()); 289Reporter.Error.WriteLine(CommandLoggingContext.IsVerbose ?
Program.cs (4)
85Reporter.Error.WriteLine(CommandLoggingContext.IsVerbose 101Reporter.Error.WriteLine(e.ToString().Red().Bold()); 282Reporter.Error.WriteLine(e.Message.Red()); 398var reporter = Reporter.Error;
ReleasePropertyProjectLocator.cs (1)
258Reporter.Error.WriteLine(e.Message);
Microsoft.DotNet.Cli.Utils (1)
Command.cs (1)
160_stdErr?.ForwardTo(writeLine: Reporter.Error.WriteLine);
Microsoft.TemplateEngine.Cli (123)
Commands\BaseCommand.cs (5)
257Reporter.Error.WriteLine(ex.Message.Bold().Red()); 270Reporter.Error.WriteLine(ex.Message.Bold().Red()); 275Reporter.Error.WriteLine(ex.StackTrace.Bold().Red()); 282Reporter.Error.WriteLine(); 283Reporter.Error.WriteLine(LocalizableStrings.BaseCommand_ExitCodeHelp, (int)returnCode);
Commands\create\InstantiateCommand.cs (7)
221HandleNoMatchingTemplateGroup(instantiateArgs, allTemplateGroups, Reporter.Error); 226return HandleAmbiguousTemplateGroup(environmentSettings, templatePackageManager, selectedTemplateGroups, Reporter.Error, cancellationToken); 293Reporter.Error, 297return HandleNoTemplateFoundResult(args, environmentSettings, templatePackageManager, templateGroup, Reporter.Error); 313Reporter.Error); 322Reporter.Error); 449Reporter.Error.WriteLine(LocalizableStrings.GenericWarning, e.Message);
Commands\create\InstantiateCommand.NoMatchHandling.cs (3)
196Reporter.Error.WriteLine(string.Format(LocalizableStrings.Generic_Info_NoMatchingTemplates, baseInputParameters).Bold().Red()); 207Reporter.Error.WriteLine(string.Format(LocalizableStrings.TemplateOptions_Error_AllowedValuesForOptionList, token.Value, allowedValues)); 211Reporter.Error.WriteLine();
Commands\create\InstantiateCommand.TabCompletion.cs (1)
92Reporter.Error.WriteLine(LocalizableStrings.GenericWarning, e.Message);
Commands\create\TemplateCommand.cs (2)
154TemplatePackageDisplay templatePackageDisplay = new(Reporter.Output, Reporter.Error); 223var reporter = templateArgs.IsForceFlagSpecified ? Reporter.Output : Reporter.Error;
NuGet\CliNuGetLogger.cs (2)
48Reporter.Error.WriteLine($"[NuGet Manager] [Error] {data}"); 73Reporter.Error.WriteLine($"[NuGet Manager] [Warning] {data}");
PostActionDispatcher.cs (7)
114Reporter.Error.WriteLine(LocalizableStrings.PostActionDispatcher_Error_NotSupported, action.ActionId); 117Reporter.Error.WriteLine(LocalizableStrings.PostActionDescription, action.Description); 127Reporter.Error.WriteLine(LocalizableStrings.PostActionDispatcher_Error_RunScriptNotAllowed); 130Reporter.Error.WriteLine(LocalizableStrings.PostActionDescription, action.Description); 227Reporter.Error.WriteLine(LocalizableStrings.PostActionFailedInstructionHeader); 233Reporter.Error.WriteLine(LocalizableStrings.PostActionFailedInstructionHeader); 249IReporter stream = useErrorOutput ? Reporter.Error : Reporter.Output;
PostActionProcessors\AddJsonPropertyPostActionProcessor.cs (9)
86Reporter.Error.WriteLine(string.Format(LocalizableStrings.PostAction_ModifyJson_Error_ArgumentNotConfigured, JsonFileNameArgument)); 96Reporter.Error.WriteLine(string.Format(LocalizableStrings.PostAction_ModifyJson_Error_ArgumentNotBoolean, AllowFileCreationArgument)); 102Reporter.Error.WriteLine(LocalizableStrings.PostAction_ModifyJson_Error_NoJsonFile); 108Reporter.Error.WriteLine(string.Format(LocalizableStrings.PostAction_ModifyJson_Error_ArgumentNotBoolean, DetectRepoRootForFileCreation)); 119Reporter.Error.WriteLine(string.Format(LocalizableStrings.PostAction_ModifyJson_Error_MultipleJsonFiles, jsonFileName)); 162Reporter.Error.WriteLine(string.Format(LocalizableStrings.PostAction_ModifyJson_Error_ArgumentNotBoolean, AllowPathCreationArgument)); 170Reporter.Error.WriteLine(string.Format(LocalizableStrings.PostAction_ModifyJson_Error_ParentPropertyPathInvalid, propertyPath)); 278Reporter.Error.WriteLine(string.Format(LocalizableStrings.PostAction_ModifyJson_Error_ArgumentNotConfigured, NewJsonPropertyNameArgument)); 284Reporter.Error.WriteLine(string.Format(LocalizableStrings.PostAction_ModifyJson_Error_ArgumentNotConfigured, NewJsonPropertyValueArgument));
PostActionProcessors\ChmodPostActionProcessor.cs (3)
55Reporter.Error.WriteLine(LocalizableStrings.UnableToSetPermissions, entry.Key, file); 65Reporter.Error.WriteLine(LocalizableStrings.UnableToSetPermissions, entry.Key, file); 71Reporter.Error.WriteLine(LocalizableStrings.UnableToSetPermissions, entry.Key, file);
PostActionProcessors\ProcessStartPostActionProcessor.cs (8)
21Reporter.Error.WriteLine(LocalizableStrings.PostAction_ProcessStartProcessor_Error_ConfigMissingExecutable); 66Reporter.Error.WriteLine(LocalizableStrings.CommandFailed); 75Reporter.Error.WriteLine(LocalizableStrings.CommandFailed); 76Reporter.Error.WriteCommandOutput(commandResult); 77Reporter.Error.WriteLine(string.Empty); 88Reporter.Error.WriteLine(LocalizableStrings.CommandFailed); 89Reporter.Error.WriteLine(ex.Message); 90Reporter.Error.WriteLine(string.Empty);
TemplateInvoker.cs (22)
67Reporter.Error.WriteLine(cx.Message.Bold().Red()); 70Reporter.Error.WriteLine(cx.InnerException.Message.Bold().Red()); 78Reporter.Error.WriteLine(ex.Message.Bold().Red()); 137Reporter.Error.WriteLine(string.Format(LocalizableStrings.InvalidNameParameter, printableChars, nonPrintableChars).Bold().Red()); 179Reporter.Error.WriteLine(cx.Message.Bold().Red()); 182Reporter.Error.WriteLine(cx.InnerException.Message.Bold().Red()); 189Reporter.Error.WriteLine(tae.Message.Bold().Red()); 222Reporter.Error.WriteLine(string.Format(LocalizableStrings.CreateFailed, resultTemplateName, instantiateResult.ErrorMessage).Bold().Red()); 233Reporter.Error.WriteLine(string.Format(LocalizableStrings.MissingRequiredParameter, fixedMessage, resultTemplateName).Bold().Red()); 237Reporter.Error.WriteLine(LocalizableStrings.TemplateCreator_Error_TemplateNotFound.Bold().Red()); 238Reporter.Error.WriteLine(); 266Reporter.Error.WriteLine($"{LocalizableStrings.InvalidCommandOptions}: {instantiateResult.ErrorMessage}".Bold().Red()); 267Reporter.Error.WriteLine(LocalizableStrings.RunHelpForInformationAboutAcceptedParameters); 268Reporter.Error.WriteCommand( 275Reporter.Error.WriteLine(LocalizableStrings.DestructiveChangesNotification.Bold().Red()); 284Reporter.Error.WriteLine(($" {GetChangeString(change.ChangeKind)}".PadRight(padLen) + AdjustReportedPath(change.TargetRelativePath)).Bold().Red()); 286Reporter.Error.WriteLine(); 288Reporter.Error.WriteLine( 292Reporter.Error.WriteCommand(Example.FromExistingTokens(templateArgs.ParseResult).WithOption(SharedOptions.ForceOption)); 297Reporter.Error.WriteLine(instantiateResult.ErrorMessage.Bold().Red()); 301Reporter.Error.WriteLine(LocalizableStrings.OperationCancelled.Bold().Red()); 304Reporter.Error.WriteLine(string.Format(LocalizableStrings.UnexpectedResult, Enum.GetName(typeof(CreationResultStatus), instantiateResult.Status), instantiateResult.ErrorMessage).Bold().Red());
TemplateListCoordinator.cs (8)
87Reporter.Error.WriteLine( 96Reporter.Error.WriteLine( 108Reporter.Error.WriteLine( 116Reporter.Error.WriteLine(); 118Reporter.Error.WriteLine(LocalizableStrings.Generic_CommandHints_Search); 121Reporter.Error.WriteCommand( 129Reporter.Error.WriteCommand( 135Reporter.Error.WriteLine();
TemplatePackageCoordinator.cs (34)
47_templatePackageDisplay = new TemplatePackageDisplay(Reporter.Output, Reporter.Error); 73Reporter.Error.WriteLine(LocalizableStrings.TemplatePackageCoordinator_Error_PackageForTemplateNotFound, args.Template.Identity); 99Reporter.Error.WriteLine(LocalizableStrings.TemplatePackageCoordinator_Error_PackageForTemplateNotFound, template.Identity); 163Reporter.Error.WriteLine(); 229Reporter.Error.WriteLine(LocalizableStrings.TemplatePackageCoordinator_Install_Error_FoundNoPackagesToInstall); 241Reporter.Error.WriteLine(LocalizableStrings.TemplatePackageCoordinator_Install_Error_SameInstallRequests, installRequest.PackageIdentifier); 382Reporter.Error.WriteLine(LocalizableStrings.TemplatePackageCoordinator_Uninstall_Error_GenericError, uninstallResult.TemplatePackage.DisplayName, uninstallResult.ErrorMessage); 630IReporter reporter = args.Force ? Reporter.Output : Reporter.Error; 718Reporter.Error.WriteLine( 728Reporter.Error.WriteLine(LocalizableStrings.TemplatePackageCoordinator_Error_TemplateIncludedToPackages, notFoundPackage); 733Reporter.Error.WriteLine( 739Reporter.Error.WriteLine(LocalizableStrings.TemplatePackageCoordinator_Uninstall_Error_UninstallCommandHeader); 743Reporter.Error.WriteCommand( 751Reporter.Error.WriteCommand( 760Reporter.Error.WriteLine(LocalizableStrings.TemplatePackageCoordinator_Uninstall_Error_ListPackagesHeader); 761Reporter.Error.WriteCommand( 769Reporter.Error.WriteLine(LocalizableStrings.TemplatePackageCoordinator_Uninstall_Error_ListPackagesHeader); 770Reporter.Error.WriteCommand( 775Reporter.Error.WriteLine(); 871Reporter.Error.WriteLine(); 977Reporter.Error.WriteLine( 984Reporter.Error.WriteLine( 990Reporter.Error.WriteLine( 996Reporter.Error.WriteLine( 1002Reporter.Error.WriteLine( 1006Reporter.Error.WriteLine(LocalizableStrings.TemplatePackageCoordinator_lnstall_Error_AlreadyInstalled_Hint, BaseInstallCommand.ForceOption.Aliases.First()); 1007Reporter.Error.WriteCommand(Example.For<InstallCommand>(parseResult).WithArgument(BaseInstallCommand.NameArgument, packageToInstall).WithOption(BaseInstallCommand.ForceOption)); 1011Reporter.Error.WriteLine( 1017Reporter.Error.WriteLine( 1024Reporter.Error.WriteLine( 1061Reporter.Error.WriteLine( 1069Reporter.Error.WriteLine( 1076Reporter.Error.WriteLine( 1083Reporter.Error.WriteLine(
TemplatePackageDisplay.cs (1)
330Reporter.Error.WriteLine();
TemplateSearch\CliTemplateSearchCoordinator.cs (11)
59Reporter.Error.WriteLine(LocalizableStrings.CliTemplateSearchCoordinator_Error_NoSources.Bold().Red()); 67Reporter.Error.WriteLine(LocalizableStrings.CliTemplateSearchCoordinator_Info_MatchesFromSource, result.Provider.Factory.DisplayName); 68Reporter.Error.WriteLine(string.Format(LocalizableStrings.CliTemplateSearchCoordinator_Error_SearchFailure, result.ErrorMessage).Red().Bold()); 82Reporter.Error.WriteLine( 255Reporter.Error.WriteLine(LocalizableStrings.CliTemplateSearchCoordinator_Error_NoTemplateName.Red().Bold()); 256Reporter.Error.WriteLine(LocalizableStrings.CliTemplateSearchCoordinator_Info_SearchHelp, string.Join(", ", BaseSearchCommand.SupportedFilters.Select(f => $"'{f.OptionFactory().Name}'"))); 257Reporter.Error.WriteLine(LocalizableStrings.Generic_ExamplesHeader); 258Reporter.Error.WriteCommand( 264Reporter.Error.WriteCommand( 270Reporter.Error.WriteCommand( 282Reporter.Error.WriteLine(LocalizableStrings.CliTemplateSearchCoordinator_Error_TemplateNameIsTooShort.Bold().Red());