diff --git a/src/JKToolKit.Spectre.AutoCompletion/Integrations/Powershell/PowershellIntegrationBuilder.cs b/src/JKToolKit.Spectre.AutoCompletion/Integrations/Powershell/PowershellIntegrationBuilder.cs index e42096e..0b4647f 100644 --- a/src/JKToolKit.Spectre.AutoCompletion/Integrations/Powershell/PowershellIntegrationBuilder.cs +++ b/src/JKToolKit.Spectre.AutoCompletion/Integrations/Powershell/PowershellIntegrationBuilder.cs @@ -3,7 +3,8 @@ using System.IO; using System.Text; -using JKToolKit.Spectre.AutoCompletion.Integrations.Properties; +using JKToolKit.Spectre.AutoCompletion.Properties; + public class StartArgs { public string Runtime { get; } @@ -115,6 +116,7 @@ private static string GetResource(byte[] powershellIntegration_Install, Dictiona var result = Encoding.UTF8.GetString(powershellIntegration_Install); return ApplyReplacements(replacements, result); } + private static string GetResource(string resourceName, Dictionary replacements) { var result = Resources.ResourceManager.GetString(resourceName) ?? throw new InvalidOperationException($"Could not find resource '{resourceName}'."); @@ -129,6 +131,4 @@ private static string ApplyReplacements(Dictionary replacements, } return result; } - - } \ No newline at end of file diff --git a/src/JKToolKit.Spectre.AutoCompletion/JKToolKit.Spectre.AutoCompletion.csproj b/src/JKToolKit.Spectre.AutoCompletion/JKToolKit.Spectre.AutoCompletion.csproj index 5063945..b87bd1c 100644 --- a/src/JKToolKit.Spectre.AutoCompletion/JKToolKit.Spectre.AutoCompletion.csproj +++ b/src/JKToolKit.Spectre.AutoCompletion/JKToolKit.Spectre.AutoCompletion.csproj @@ -25,5 +25,18 @@ + + + True + True + Resources.resx + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + diff --git a/src/JKToolKit.Spectre.AutoCompletion/Properties/Resources.Designer.cs b/src/JKToolKit.Spectre.AutoCompletion/Properties/Resources.Designer.cs index 8f1704f..736aeb4 100644 --- a/src/JKToolKit.Spectre.AutoCompletion/Properties/Resources.Designer.cs +++ b/src/JKToolKit.Spectre.AutoCompletion/Properties/Resources.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace JKToolKit.Spectre.AutoCompletion.Integrations.Properties { +namespace JKToolKit.Spectre.AutoCompletion.Properties { using System; @@ -39,7 +39,7 @@ internal Resources() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("JKToolKit.Spectre.AutoCompletion.Integrations.Properties.Resources", typeof(Resources).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("JKToolKit.Spectre.AutoCompletion.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan;