diff --git a/src/coreclr/tools/Common/Compiler/CompilerTypeSystemContext.cs b/src/coreclr/tools/Common/Compiler/CompilerTypeSystemContext.cs index 21a1a0307e6c0..e708130f6fc36 100644 --- a/src/coreclr/tools/Common/Compiler/CompilerTypeSystemContext.cs +++ b/src/coreclr/tools/Common/Compiler/CompilerTypeSystemContext.cs @@ -184,8 +184,6 @@ public static unsafe PEReader OpenPEFile(string filePath, out MemoryMappedViewAc private EcmaModule AddModule(string filePath, string expectedSimpleName, bool useForBinding, ModuleData oldModuleData = null, bool throwOnFailureToLoad = true) { - filePath = Path.GetFullPath(filePath); - PEReader peReader = null; MemoryMappedViewAccessor mappedViewAccessor = null; PdbSymbolReader pdbReader = null; @@ -193,6 +191,7 @@ private EcmaModule AddModule(string filePath, string expectedSimpleName, bool us { if (oldModuleData == null) { + filePath = Path.GetFullPath(filePath); peReader = OpenPEFile(filePath, out mappedViewAccessor); #if !READYTORUN