ildasm/ilasm to system.data.dll in framework 2.0 result in error

G

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
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.
 
D

Damien

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.

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
 
G

gilad

Hi,
Thanks for the information. Can you please send the link to the MSDN
article?

Gilad.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top