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