diff --git a/Source/Editor/Modules/SourceCodeEditing/CodeDocsModule.cs b/Source/Editor/Modules/SourceCodeEditing/CodeDocsModule.cs index 92df83985..225bad082 100644 --- a/Source/Editor/Modules/SourceCodeEditing/CodeDocsModule.cs +++ b/Source/Editor/Modules/SourceCodeEditing/CodeDocsModule.cs @@ -257,13 +257,18 @@ namespace FlaxEditor.Modules.SourceCodeEditing { Profiler.BeginEvent("GetXmlDocs"); - var uri = new UriBuilder(Utils.GetAssemblyLocation(assembly)); - var path = Uri.UnescapeDataString(uri.Path); - var name = assembly.GetName().Name; - var xmlFilePath = Path.Combine(Path.GetDirectoryName(path), name + ".xml"); + var assemblyPath = Utils.GetAssemblyLocation(assembly); + var assemblyName = assembly.GetName().Name; + var xmlFilePath = Path.ChangeExtension(assemblyPath, ".xml"); + if (!File.Exists(assemblyPath)) + { + var uri = new UriBuilder(assemblyPath); + var path = Uri.UnescapeDataString(uri.Path); + xmlFilePath = Path.Combine(Path.GetDirectoryName(path), assemblyName + ".xml"); + } if (File.Exists(xmlFilePath)) { - Profiler.BeginEvent(name); + Profiler.BeginEvent(assemblyName); try { // Parse xml documentation diff --git a/Source/Engine/Utilities/Utils.cs b/Source/Engine/Utilities/Utils.cs index 540f3291a..12a38586d 100644 --- a/Source/Engine/Utilities/Utils.cs +++ b/Source/Engine/Utilities/Utils.cs @@ -235,12 +235,11 @@ namespace FlaxEngine public static string GetAssemblyLocation(Assembly assembly) { #if USE_NETCORE - if (!string.IsNullOrEmpty(assembly.Location)) - return assembly.Location; - - if (NativeInterop.AssemblyLocations.TryGetValue(assembly.FullName, out string assemblyLocation)) - return assemblyLocation; - + var location = assembly.Location; + if (!string.IsNullOrEmpty(location)) + return location; + if (NativeInterop.AssemblyLocations.TryGetValue(assembly.FullName, out location)) + return location; return null; #else return assembly.Location;