Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Build/Logging/LoggerDescription.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ internal int LoggerId
/// <summary>
/// This property generates the logger name by appending together the class name and assembly name
/// </summary>
internal string Name
public string Name
{
get
{
Expand All @@ -104,7 +104,7 @@ internal string Name
}
else
{
return _loggerAssembly.AssemblyFile;
return _loggerAssembly.AssemblyFile ?? _loggerAssembly.AssemblyName;
}
}
}
Expand Down
16 changes: 8 additions & 8 deletions src/MSBuild.UnitTests/XMake_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2457,13 +2457,13 @@ public void MultipleTargetsDoesNotCrash()
}

[Theory]
[InlineData("-logger:,\"nonExistentlogger.dll\",IsOptional;Foo")]
[InlineData("-logger:ClassA,\"nonExistentlogger.dll\",IsOptional;Foo")]
[InlineData("-logger:,\"nonExistentlogger.dll\",IsOptional,OptionB,OptionC")]
[InlineData("-distributedlogger:,\"nonExistentlogger.dll\",IsOptional;Foo")]
[InlineData("-distributedlogger:ClassA,\"nonExistentlogger.dll\",IsOptional;Foo")]
[InlineData("-distributedlogger:,\"nonExistentlogger.dll\",IsOptional,OptionB,OptionC")]
public void MissingOptionalLoggersAreIgnored(string logger)
[InlineData("-logger:,\"nonExistentlogger.dll\",IsOptional;Foo", "nonExistentLogger.dll")]
[InlineData("-logger:ClassA,\"nonExistentlogger.dll\",IsOptional;Foo", "ClassA")]
[InlineData("-logger:,\"nonExistentlogger.dll\",IsOptional,OptionB,OptionC", "nonExistentLogger.dll")]
[InlineData("-distributedlogger:,\"nonExistentlogger.dll\",IsOptional;Foo", "nonExistentLogger.dll")]
[InlineData("-distributedlogger:ClassA,\"nonExistentlogger.dll\",IsOptional;Foo", "ClassA")]
[InlineData("-distributedlogger:,\"nonExistentlogger.dll\",IsOptional,OptionB,OptionC", "nonExistentLogger.dll")]
public void MissingOptionalLoggersAreIgnored(string logger, string expectedLoggerName)
{
string projectString =
"<Project>" +
Expand All @@ -2477,7 +2477,7 @@ public void MissingOptionalLoggersAreIgnored(string logger)
var output = RunnerUtilities.ExecMSBuild(parametersLoggerOptional, out bool successfulExit, _output);
successfulExit.ShouldBe(true);
output.ShouldContain("Hello", customMessage: output);
output.ShouldContain("The specified logger could not be created and will not be used.", customMessage: output);
output.ShouldContain($"The specified logger \"{expectedLoggerName}\" could not be created and will not be used.", customMessage: output);
}

[Theory]
Expand Down
5 changes: 3 additions & 2 deletions src/MSBuild/Resources/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1398,10 +1398,11 @@
<comment>{StrBegin="MSBUILD : error MSB1058: "}</comment>
</data>
<data name="OptionalLoggerCreationMessage" UESanitized="true" Visibility="Public">
<value>The specified logger could not be created and will not be used. {0}</value>
<value>The specified logger "{0}" could not be created and will not be used. {1}</value>
<comment>
UE: This error is shown when a logger cannot be loaded and instantiated from its assembly.
LOCALIZATION: {0} contains the exception message explaining why the
LOCALIZATION: {0} contains the logger description passed on the command line or in a
response file. {1} contains the exception message explaining why the
logger could not be created -- this message comes from the CLR/FX and is localized.
</comment>
</data>
Expand Down
7 changes: 4 additions & 3 deletions src/MSBuild/Resources/xlf/Strings.cs.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions src/MSBuild/Resources/xlf/Strings.de.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions src/MSBuild/Resources/xlf/Strings.es.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions src/MSBuild/Resources/xlf/Strings.fr.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions src/MSBuild/Resources/xlf/Strings.it.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions src/MSBuild/Resources/xlf/Strings.ja.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions src/MSBuild/Resources/xlf/Strings.ko.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions src/MSBuild/Resources/xlf/Strings.pl.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions src/MSBuild/Resources/xlf/Strings.pt-BR.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions src/MSBuild/Resources/xlf/Strings.ru.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions src/MSBuild/Resources/xlf/Strings.tr.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions src/MSBuild/Resources/xlf/Strings.zh-Hans.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions src/MSBuild/Resources/xlf/Strings.zh-Hant.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/MSBuild/XMake.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4275,7 +4275,7 @@ private static bool CreateAndConfigureLogger(
}
catch (Exception e) when (loggerDescription.IsOptional)
{
Console.WriteLine(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("OptionalLoggerCreationMessage", e.Message));
Console.WriteLine(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("OptionalLoggerCreationMessage", loggerDescription.Name, e.Message));
return false;
}

Expand Down