Skip to content

Commit

Permalink
Merge pull request #1548 from sunahe/master
Browse files Browse the repository at this point in the history
Provide shorter path to an unmanaged API.
  • Loading branch information
nguerrera authored Oct 30, 2017
2 parents f577a46 + e8c0b49 commit 66fe1d7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#if NET46
using System;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
Expand Down Expand Up @@ -42,8 +43,9 @@ internal static bool GetFileDependsOnNETStandard(string filePath)
{
// on Windows use CLR's unmanaged metadata API.
// Create the metadata dispenser and open scope on the source file.
var filePathAbsolute = Path.GetFullPath(filePath);
var metadataDispenser = (IMetaDataDispenser)new CorMetaDataDispenser();
var assemblyImport = (IMetaDataAssemblyImport)metadataDispenser.OpenScope(filePath, 0, s_importerGuid);
var assemblyImport = (IMetaDataAssemblyImport)metadataDispenser.OpenScope(filePathAbsolute, 0, s_importerGuid);

var asmRefEnum = IntPtr.Zero;
var asmRefTokens = new UInt32[16];
Expand Down

0 comments on commit 66fe1d7

Please sign in to comment.