From 7d1e5deed7304612eccfa9cb57b0decf083a868c Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Wed, 26 Dec 2018 17:14:40 -0800 Subject: Remove lingering uses of .resx from WixToolset.Core --- src/WixToolset.Core/Compiler.cs | 2 +- .../Extensibility/MutatorExtension.cs | 2 +- .../ExtensibilityServices/Messaging.cs | 16 +- .../ExtensibilityServices/PreprocessHelper.cs | 4 +- src/WixToolset.Core/Harvester.cs | 2 +- src/WixToolset.Core/Linker.cs | 10 +- src/WixToolset.Core/WixStrings.resx | 174 --------------------- 7 files changed, 18 insertions(+), 192 deletions(-) delete mode 100644 src/WixToolset.Core/WixStrings.resx (limited to 'src/WixToolset.Core') diff --git a/src/WixToolset.Core/Compiler.cs b/src/WixToolset.Core/Compiler.cs index 2a38cc61..576e60d0 100644 --- a/src/WixToolset.Core/Compiler.cs +++ b/src/WixToolset.Core/Compiler.cs @@ -10757,7 +10757,7 @@ namespace WixToolset.Core msiVersion = 500; break; default: - throw new ArgumentException(WixStrings.EXP_UnknownPlatformEnum, this.CurrentPlatform.ToString()); + throw new ArgumentException("Unknown platform enumeration '{0}' encountered.", this.CurrentPlatform.ToString()); } foreach (var attrib in node.Attributes()) diff --git a/src/WixToolset.Core/Extensibility/MutatorExtension.cs b/src/WixToolset.Core/Extensibility/MutatorExtension.cs index f95b5b11..afc76b79 100644 --- a/src/WixToolset.Core/Extensibility/MutatorExtension.cs +++ b/src/WixToolset.Core/Extensibility/MutatorExtension.cs @@ -151,7 +151,7 @@ namespace WixToolset.Core.Extensibility } } - throw new InvalidOperationException(WixStrings.EXP_CouldnotFileUniqueIDForResourceName); + throw new InvalidOperationException("Could not find a unique identifier for the given resource name."); } /// diff --git a/src/WixToolset.Core/ExtensibilityServices/Messaging.cs b/src/WixToolset.Core/ExtensibilityServices/Messaging.cs index 4510f264..f4673952 100644 --- a/src/WixToolset.Core/ExtensibilityServices/Messaging.cs +++ b/src/WixToolset.Core/ExtensibilityServices/Messaging.cs @@ -65,10 +65,10 @@ namespace WixToolset.Core.ExtensibilityServices { if (fileNames.Count == 0) { - errorFileName = String.Format(CultureInfo.CurrentUICulture, WixStrings.Format_FirstLineNumber, sln.FileName, sln.LineNumber); + errorFileName = String.Format(CultureInfo.CurrentUICulture, "{0}({1})", sln.FileName, sln.LineNumber); } - fileNames.Add(String.Format(CultureInfo.CurrentUICulture, WixStrings.Format_LineNumber, sln.FileName, sln.LineNumber)); + fileNames.Add(String.Format(CultureInfo.CurrentUICulture, "{0}: line {1}", sln.FileName, sln.LineNumber)); } else { @@ -84,11 +84,11 @@ namespace WixToolset.Core.ExtensibilityServices var levelString = String.Empty; if (MessageLevel.Warning == level) { - levelString = WixStrings.MessageType_Warning; + levelString = "warning"; } else if (MessageLevel.Error == level) { - levelString = WixStrings.MessageType_Error; + levelString = "error"; } string formatted; @@ -104,20 +104,20 @@ namespace WixToolset.Core.ExtensibilityServices var builder = new StringBuilder(); if (level == MessageLevel.Information || level == MessageLevel.Verbose) { - builder.AppendFormat(WixStrings.Format_InfoMessage, formatted); + builder.Append(formatted); } else { - builder.AppendFormat(WixStrings.Format_NonInfoMessage, errorFileName, levelString, shortAppName, message.Id, formatted); + builder.AppendFormat("{0} : {1} {2}{3:0000} : {4}", errorFileName, levelString, shortAppName, message.Id, formatted); } if (fileNames.Count > 1) { - builder.AppendFormat(WixStrings.INF_SourceTrace, Environment.NewLine); + builder.AppendFormat("Source trace:{0}", Environment.NewLine); foreach (var fileName in fileNames) { - builder.AppendFormat(WixStrings.INF_SourceTraceLocation, fileName, Environment.NewLine); + builder.AppendFormat("Source trace:{0}", fileName, Environment.NewLine); } builder.AppendLine(); diff --git a/src/WixToolset.Core/ExtensibilityServices/PreprocessHelper.cs b/src/WixToolset.Core/ExtensibilityServices/PreprocessHelper.cs index 562f094f..f95b4110 100644 --- a/src/WixToolset.Core/ExtensibilityServices/PreprocessHelper.cs +++ b/src/WixToolset.Core/ExtensibilityServices/PreprocessHelper.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. namespace WixToolset.Core.ExtensibilityServices { @@ -245,7 +245,7 @@ namespace WixToolset.Core.ExtensibilityServices return "arm"; default: - throw new ArgumentException(WixStrings.EXP_UnknownPlatformEnum, context.Platform.ToString()); + throw new ArgumentException("Unknown platform enumeration '{0}' encountered.", context.Platform.ToString()); } default: diff --git a/src/WixToolset.Core/Harvester.cs b/src/WixToolset.Core/Harvester.cs index 3f066d15..3399420c 100644 --- a/src/WixToolset.Core/Harvester.cs +++ b/src/WixToolset.Core/Harvester.cs @@ -35,7 +35,7 @@ namespace WixToolset.Core { if (null != this.harvesterExtension) { - throw new InvalidOperationException(WixStrings.EXP_MultipleHarvesterExtensionsSpecified); + throw new InvalidOperationException("Multiple harvester extensions specified."); } this.harvesterExtension = value; diff --git a/src/WixToolset.Core/Linker.cs b/src/WixToolset.Core/Linker.cs index 80d57fa7..9b32ad1d 100644 --- a/src/WixToolset.Core/Linker.cs +++ b/src/WixToolset.Core/Linker.cs @@ -1229,7 +1229,7 @@ namespace WixToolset.Core break; default: - throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixStrings.EXP_UnexpectedComplexReferenceChildType, Enum.GetName(typeof(ComplexReferenceChildType), wixComplexReferenceRow.ChildType))); + throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, "Unexpected complex reference child type: {0}", Enum.GetName(typeof(ComplexReferenceChildType), wixComplexReferenceRow.ChildType))); } break; @@ -1260,7 +1260,7 @@ namespace WixToolset.Core break; default: - throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixStrings.EXP_UnexpectedComplexReferenceChildType, Enum.GetName(typeof(ComplexReferenceChildType), wixComplexReferenceRow.ChildType))); + throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, "Unexpected complex reference child type: {0}", Enum.GetName(typeof(ComplexReferenceChildType), wixComplexReferenceRow.ChildType))); } break; @@ -1272,7 +1272,7 @@ namespace WixToolset.Core break; default: - throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixStrings.EXP_UnexpectedComplexReferenceChildType, Enum.GetName(typeof(ComplexReferenceChildType), wixComplexReferenceRow.ChildType))); + throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, "Unexpected complex reference child type: {0}", Enum.GetName(typeof(ComplexReferenceChildType), wixComplexReferenceRow.ChildType))); } break; @@ -1291,13 +1291,13 @@ namespace WixToolset.Core break; default: - throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixStrings.EXP_UnexpectedComplexReferenceChildType, Enum.GetName(typeof(ComplexReferenceChildType), wixComplexReferenceRow.ChildType))); + throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, "Unexpected complex reference child type: {0}", Enum.GetName(typeof(ComplexReferenceChildType), wixComplexReferenceRow.ChildType))); } break; default: // Note: Groups have been processed before getting here so they are not handled by any case above. - throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixStrings.EXP_UnexpectedComplexReferenceChildType, Enum.GetName(typeof(ComplexReferenceParentType), wixComplexReferenceRow.ParentType))); + throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, "Unexpected complex reference child type: {0}", Enum.GetName(typeof(ComplexReferenceParentType), wixComplexReferenceRow.ParentType))); } } diff --git a/src/WixToolset.Core/WixStrings.resx b/src/WixToolset.Core/WixStrings.resx deleted file mode 100644 index 47402f59..00000000 --- a/src/WixToolset.Core/WixStrings.resx +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Could not find a unique identifier for the given resource name. - - - Expected ComplexReference type. - - - Found an ActionRow with a non-existent {0} action: {1}. - - - Found an ActionRow with no Sequence, Before, or After column set. - - - Multiple harvester extensions specified. - - - Unexpected complex reference child type: {0} - - - Unexpected entry section type: {0} - - - Encountered an unexpected error while merging '{0}'. More information about the merge and the failure can be found in the merge log: '{1}' - - - Encountered an unexpected merge error of type '{0}' for which there is currently no error message to display. More information about the merge and the failure can be found in the merge log: '{1}' - - - Unknown platform enumeration '{0}' encountered. - - - {0}({1}) - - - {0} - - - {0}: line {1} - - - {0} : {1} {2}{3:0000} : {4} - - - Source trace:{0} - - - at {0}{1} - - - error - - - warning - - \ No newline at end of file -- cgit v1.2.3-55-g6feb