Ilasm.exe injects mscorlib dependency in .NET Standard 2.0 dll -
i'm building .net core 2.0 library il. earlier did same .net core 1.0/1.1 no issues. however, same thing not work .net core 2.0 dll.
after running this:
c:\windows\microsoft.net\framework64\v4.0.30319\ilasm.exe /output=output.dll /nologo /quiet /dll /resource=input.dll.res /ssver=6.0 input.dll.il
i'm getting warning:
warning : reference undeclared extern assembly 'mscorlib'. attempting autodetect
as result, mscorlib
appear dependency in output.dll (and don't want there).
in input.dll.il (and res file too), mscorlib not mentioned @ (mscorlib
string never appears in file, double-checked this):
// microsoft (r) .net framework il disassembler. version 4.6.1055.0 // copyright (c) microsoft corporation. rights reserved. // metadata version: v4.0.30319 .module extern 'advapi32' .module extern 'kernel32' .module extern 'kernel32' .module extern 'ncrypt' .module extern 'crypt32' .module extern 'crypt32' .module extern 'secur32' .assembly extern 'netstandard' { .publickeytoken = (cc 7b 13 ff cd 2d dd 51 ) // .{...-.q .ver 2:0:0:0 } .assembly extern 'microsoft.win32.registry' { .publickeytoken = (b0 3f 5f 7f 11 d5 0a 3a ) // .?_....: .ver 4:1:0:0 } .assembly 'mylibrary' { ...
i tried copy netstandard.dll in working folder no effect. maybe .net core 2.0 special version of ilasm.exe needed? i'm using 1 .net framework 4.5 didn't find ilasm in .net core 2.0 sdk (maybe search in wrong places). or else reason?
the difference .net core 1.0 (which worked fine) .assembly extern 'netstandard'
.assembly extern 'system.runtime'
.
there related issue .net core ilasm (which presumably forked full framework's): https://github.com/dotnet/coreclr/issues/10590
Comments
Post a Comment