}
}
- // This call opens and closes the file, but does not add the
- // assembly to the domain.
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- static internal extern AssemblyName nGetFileInformation(String s);
-
// Helper to return AssemblyName corresponding to the path of an IL assembly
public static AssemblyName GetAssemblyName(string assemblyPath)
{
throw new ArgumentNullException(nameof(assemblyPath));
}
- string fullPath = Path.GetFullPath(assemblyPath);
- return nGetFileInformation(fullPath);
+ return AssemblyName.GetAssemblyName(assemblyPath);
}
-
+
[DllImport(JitHelpers.QCall, CharSet = CharSet.Unicode)]
[SuppressUnmanagedCodeSecurity]
private static extern IntPtr GetLoadContextForAssembly(RuntimeAssembly assembly);
QCFuncElement("InternalLoadUnmanagedDllFromPath", AssemblyNative::InternalLoadUnmanagedDllFromPath)
QCFuncElement("CanUseAppPathAssemblyLoadContextInCurrentDomain", AssemblyNative::CanUseAppPathAssemblyLoadContextInCurrentDomain)
QCFuncElement("LoadFromStream", AssemblyNative::LoadFromStream)
- FCFuncElement("nGetFileInformation", AssemblyNameNative::GetFileInformation)
QCFuncElement("GetLoadContextForAssembly", AssemblyNative::GetLoadContextForAssembly)
#if defined(FEATURE_MULTICOREJIT)
QCFuncElement("InternalSetProfileRoot", MultiCoreJITNative::InternalSetProfileRoot)