Getting MSIL code from VS.NET

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All

I can't seem to find anything about this but is there a way to get VS.Net to compile into ASCII MSIL rather than a binary assembly? Would I have to use the command line compiler to do this?
 
Alex said:
Hi All,

I can't seem to find anything about this but is there a way to get VS.Net to compile into ASCII MSIL rather than a binary assembly? Would I have to use the command line compiler to do this?

As far as I know, the command line compilers won't generate an MSIL
listing either. You can use "ildasm /TEXT" or "ildasm /OUT=filename" to
get an MSIL listing.

Drop the ildasm command into your makefile or a "post-build event" if
you're using VS.NET 20030 (or a makefile project that's dependant on
your real project if you're using VS.NET 2002).
 
Alex said:
Hi All,

I can't seem to find anything about this but is there a way to get VS.Net to compile into ASCII MSIL rather than a binary assembly? Would I have to use the command line compiler to do this?

Here's how I added the ability to fire-up ILDASM for the current
project's executable:

Tools ->
External Tools... ->
Add ->
Title: ILDASM ->
Command: ... ->
C:\Program Files\Microsoft Visual Studio .NET
2003\SDK\v1.1\Bin\ildasm.exe ->
Arguments: $(TargetPath) ->
OK
 
That's a compiler-dependent feature. Many compilers don't emit Textual IL,
instead they write the binary file. So, it's just not possible for them to
output Textual IL (as far as the compiler is concerned, it doesn't exist).
Some compilers do allow this, and will output an IL file for you to assemble
or look at manually.

-mike
MVP
 

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

Back
Top