From 5bdefb2a8322ec01c7c1a2f7f05850da7de570ce Mon Sep 17 00:00:00 2001 From: pinzart90 Date: Fri, 17 May 2024 09:39:45 -0400 Subject: [PATCH 1/2] fix extension assembly paths for linux --- src/DynamoCore/Extensions/ExtensionLoader.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/DynamoCore/Extensions/ExtensionLoader.cs b/src/DynamoCore/Extensions/ExtensionLoader.cs index e734a8815bb..ec3381e4575 100644 --- a/src/DynamoCore/Extensions/ExtensionLoader.cs +++ b/src/DynamoCore/Extensions/ExtensionLoader.cs @@ -74,7 +74,8 @@ public IExtension Load(string extensionPath) { if (item.Name == "AssemblyPath") { - path = Path.Combine(path, item.InnerText); + // Usually the extension configs are written on a Windows system, so we only need to make them compatible with linux + path = Path.Combine(path, item.InnerText.Replace('\\', Path.DirectorySeparatorChar)); definition.AssemblyPath = path; } else if (item.Name == "TypeName") From 907d01455e0b1f990e6b1bb41dff21862aa6fef7 Mon Sep 17 00:00:00 2001 From: pinzart90 Date: Fri, 17 May 2024 09:45:50 -0400 Subject: [PATCH 2/2] Update ExtensionLoader.cs --- src/DynamoCore/Extensions/ExtensionLoader.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/DynamoCore/Extensions/ExtensionLoader.cs b/src/DynamoCore/Extensions/ExtensionLoader.cs index ec3381e4575..b641702e22a 100644 --- a/src/DynamoCore/Extensions/ExtensionLoader.cs +++ b/src/DynamoCore/Extensions/ExtensionLoader.cs @@ -75,7 +75,8 @@ public IExtension Load(string extensionPath) if (item.Name == "AssemblyPath") { // Usually the extension configs are written on a Windows system, so we only need to make them compatible with linux - path = Path.Combine(path, item.InnerText.Replace('\\', Path.DirectorySeparatorChar)); + string assemblyRelativePath = OSHelper.IsWindows() ? item.InnerText : item.InnerText.Replace('\\', Path.DirectorySeparatorChar); + path = Path.Combine(path, assemblyRelativePath); definition.AssemblyPath = path; } else if (item.Name == "TypeName")