From 85767ff4542bd39dae6d90cc42f246d88382b608 Mon Sep 17 00:00:00 2001 From: Ruben Weituschewitz Date: Fri, 25 Nov 2016 17:51:50 +0100 Subject: [PATCH] Changed Assembly.CodeBase to Assembly.EscapedCodeBase to prevent errors for paths with characters like '#' that have meanings in URIs. --- src/LightInject/LightInject.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LightInject/LightInject.cs b/src/LightInject/LightInject.cs index 28ecb3d8..a4f7bfa7 100644 --- a/src/LightInject/LightInject.cs +++ b/src/LightInject/LightInject.cs @@ -6590,7 +6590,7 @@ public class AssemblyLoader : IAssemblyLoader /// A list of assemblies based on the given . public IEnumerable Load(string searchPattern) { - string directory = Path.GetDirectoryName(new Uri(typeof(ServiceContainer).Assembly.CodeBase).LocalPath); + string directory = Path.GetDirectoryName(new Uri(typeof(ServiceContainer).Assembly.EscapedCodeBase).LocalPath); if (directory != null) { string[] searchPatterns = searchPattern.Split('|');