Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: Adding ILDASM.exe to VS.NET Tools Menu  (Read 2322 times)
Hypnotron
Customers
Community Member
*****
Posts: 1043


« on: October 15, 2009, 08:56:43 PM »

Hey you managed .NET developers!  When you're getting closer to releasing your brand new game on the unsuspecting public, it might be a nice idea to spend some time optimizing your lazy, poorly written, bloated code so your victims wont suffer quite as much.  One tool that can provide some insight into how any particular routine or line of code is being run by the CLR is the IL Disassembler (ILDASM.EXE) which is free and installs with VS.NET.

But it's somewhat annoying to use.  Wouldn't it be better if it was integrated into the IDE so that you could click a menu item and the assembly you're coding would just load automatically into the ILDASM treeview? 

Well it's easy and it'll take you 30 seconds to do!


in VS.NET
- click the menu   Tools \ External Tools
- click Add
- In the fields set:
   Name: ILDASM
   Command: C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\ildasm.exe
   Arguments: $(TargetPath)
- check the box  "Use Output Window"
- Finished.

I use VS.NET 2008 but the steps should be similar for all.  However older versions of VS.NET might install the ildasm.exe somewhere else.  If so, you'll just have to do some browsing.

But there ya have it.  Now you can just click   Tools \ ILDASM  and which ever assembly you're currently editing will load into the viewer automatically and you can begin looking at the IL.

Some sights have warned that you should remember to close the ILDASM viewer window before recompiling your assembly because the file will be locked and the compiler wont be able to delete it to write the new version.

You can add other tools to the VS.NET Tools menu this way as well. 
Logged
Zaknafein
Customers
Community Member
*****
Posts: 2940


WWW
« Reply #1 on: October 20, 2009, 04:36:55 PM »

I prefer using the Reflector to do that. It disassembles to IL but also C# and VB.Net, or whichever CLR-supported language... mostly useful to inspect other people's code, but sometimes to optimize yours!
Logged

rootsage
Customers
Community Member
*****
Posts: 444

Gamer Enthusiast


WWW
« Reply #2 on: October 21, 2009, 12:30:55 PM »

I use Reflector as well, I really like it. I will have to try the IL Disassembler though...
Logged

while( !( succeed = try_again()) );
------
10 print "Is this recursive?"
20 goto 10
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks