Using ildasm.exe I got il file. then, using ilasm I wanted to get the
assembly back but it failed. at the beginning it showed the following
error for several global methods with pinvokeimpl.
error -- Local (embedded native) PInvoke method, the resulting PE file
is unusable
Is this a known bug?
Anything to bypass it?
Thanks,
Gilad.
> Using ildasm.exe I got il file. then, using ilasm I wanted to get the
> assembly back but it failed. at the beginning it showed the following
[quoted text clipped - 8 lines]
> Thanks,
> Gilad.
The problem is, System.Data.dll isn't a pure IL assembly - it contains
some native code. As noted in the docs for ildasm (at least the 1.1
version, probably the same in later versions):
Currently, you cannot use this technique with PE files that contain
embedded native code (for example, PE files produced by Visual C+
+ .NET).
(I just pulled up MSDN for 2.0 and it says the same)
So, your IL file doesn't contain enough info to recreate the file.
Damien
gilad - 15 Jul 2007 07:00 GMT
Hi,
Thanks for the information. Can you please send the link to the MSDN
article?
Gilad.
Damien - 16 Jul 2007 07:29 GMT
> Hi,
> Thanks for the information. Can you please send the link to the MSDN
> article?
>
> Gilad.
Look down in the Remarks section
http://msdn2.microsoft.com/en-us/library/f7dy01k1(VS.80).aspx
But it really doesn't explain much more.
Damien