mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Make generated implicit remoting modules backwards compatible with PowerShell 5 (#17227)
* Fix implicit remoting generator version check * Fix implicit remoting generator version check
This commit is contained in:
+3
-1
@@ -2100,7 +2100,9 @@ $script:MyModule = $MyInvocation.MyCommand.ScriptBlock.Module
|
||||
|
||||
// In Win8, we are no longer loading all assemblies by default.
|
||||
// So we need to use the fully qualified name when accessing a type in that assembly
|
||||
string versionOfScriptGenerator = "[" + typeof(ExportPSSessionCommand).AssemblyQualifiedName + "]" + "::VersionOfScriptGenerator";
|
||||
Type type = typeof(ExportPSSessionCommand);
|
||||
string asmName = type.Assembly.GetName().Name;
|
||||
string versionOfScriptGenerator = $"[{type.FullName}, {asmName}]::VersionOfScriptGenerator";
|
||||
GenerateTopComment(writer);
|
||||
writer.Write(
|
||||
HeaderTemplate,
|
||||
|
||||
Reference in New Issue
Block a user