From a6973106691a5cb2ccb66beba2af5ec4a6ad0f91 Mon Sep 17 00:00:00 2001 From: Taylor Marvin Date: Sun, 29 Jun 2025 04:23:28 -0700 Subject: [PATCH 1/2] - Add .vs directory to git ignore - Remove unnecessary extra word in extension comment --- .gitignore | 1 + src/PowerShellEditorServices/Utility/Extensions.cs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index d8c2d5b16..6e7bf44a3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.vs/ bin/ obj/ module/ diff --git a/src/PowerShellEditorServices/Utility/Extensions.cs b/src/PowerShellEditorServices/Utility/Extensions.cs index 88a9fa4f3..1ecf8db49 100644 --- a/src/PowerShellEditorServices/Utility/Extensions.cs +++ b/src/PowerShellEditorServices/Utility/Extensions.cs @@ -9,8 +9,8 @@ namespace Microsoft.PowerShell.EditorServices.Utility internal static class ObjectExtensions { /// - /// Extension to evaluate an object's ToString() method in an exception safe way. This will - /// extension method will not throw. + /// Extension to evaluate an object's ToString() method in an exception safe way. This extension + /// method will not throw. /// /// The object on which to call ToString() /// The ToString() return value or a suitable error message is that throws. From f36fcd5f7ff12c582d3ce24e73aca437f23ac70e Mon Sep 17 00:00:00 2001 From: Taylor Marvin Date: Sun, 29 Jun 2025 04:26:02 -0700 Subject: [PATCH 2/2] - Make LoadAssemblyInPsesLoadContext an Instance method instead of static. Fixes crash on windows arm64. --- .../Extensions/Api/EditorExtensionServiceProvider.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/PowerShellEditorServices/Extensions/Api/EditorExtensionServiceProvider.cs b/src/PowerShellEditorServices/Extensions/Api/EditorExtensionServiceProvider.cs index d750923fb..e57c369d6 100644 --- a/src/PowerShellEditorServices/Extensions/Api/EditorExtensionServiceProvider.cs +++ b/src/PowerShellEditorServices/Extensions/Api/EditorExtensionServiceProvider.cs @@ -162,7 +162,9 @@ public static object GetPsesAssemblyLoadContext() /// /// The absolute path of the assembly to load. /// The loaded assembly object. - public static Assembly LoadAssemblyInPsesLoadContext(string assemblyPath) +#pragma warning disable CA1822 // Mark members as static + public Assembly LoadAssemblyInPsesLoadContext(string assemblyPath) +#pragma warning restore CA1822 // Mark members as static { if (!VersionUtils.IsNetCore) {