-1

As why Intermediate code is needed is described in Stack Overflow post,my question is that,

Is the intermediate code saved in the solution ?

How can I view the whole IL generated ?

enter image description here

Reflector and the File Disassembler add-in from Denis Bauer. It actually produces source projects from assemblies, where Reflector on its own only displays the disassembled source and not Intermediate Code.

Community
  • 1
  • 1
Tharif
  • 13,794
  • 9
  • 55
  • 77
  • @Paddy thanks for your time..but that post dont say anything about Inter-Code – Tharif May 27 '15 at 08:27
  • Yes, it does. It's called "intermediate language" (or IL) in the .NET world. All common decompilers can show IL, like [Reflector](https://www.simple-talk.com/blogs/2009/07/31/net-reflector-support-can-i-view-disassembled-il-instead-of-decompiled-source-code/), [JustDecompile](http://www.telerik.com/products/decompiler/faq.aspx), [ILSpy](http://ilspy.net/). – CodeCaster May 27 '15 at 08:30
  • Voting to reopen - the OP is asking if the intermediate code saved in the solution. The "duplicate" does not answer that. – ispiro May 27 '15 at 08:47
  • When you compile (such as by clicking F5) - an `exe` file is created in the `bin` folder - that file is "written" in IL. As for how to see it - that part is covered in the "duplicate" - by using tools such as mentioned in CodeCoaster's comment above. – ispiro May 27 '15 at 08:50
  • then what about object code ! – Tharif May 27 '15 at 08:51
  • You mean real "native code"? - when you click the exe file - the native code is created on the fly. - You don't actually get a file like that in your solution. – ispiro May 27 '15 at 08:53
  • (The `bin` folder I referred to above is inside your solution folder.) – ispiro May 27 '15 at 08:56

2 Answers2

3

When you compile (such as by clicking F5) - an exe file is created in the bin folder inside your solution - that file is "written" in IL. As for how to see it - that part is covered in the "duplicate" - by using tools such as mentioned in CodeCoaster's comment above. (In ILSpy you'll have to choose ILinstead of C# or VB to show you the IL.)

ispiro
  • 26,556
  • 38
  • 136
  • 291
1

To view IL code you should use additional tools like Reflector or ILASM/ILDASM.

It's not saved, it's generated during build.

realnero
  • 994
  • 6
  • 12
  • 2
    _"It's not saved"_ - it is, in the binaries the compiler produces. See [Wiki: Assembly (CLI)](http://en.wikipedia.org/wiki/Assembly_%28CLI%29). – CodeCaster May 27 '15 at 08:41
  • @CodeCaster, see questions - "Is the intermediate code saved in the solution ?", It's not, it's the output of the build. – realnero May 27 '15 at 12:18
  • Do you know what OP means by "in the solution"? The output folder usually is inside the solution folder, so in a way, the binaries are in the solution. IL is anyway _not_ "generated in run-time", unless you mean during the runtime of the compiler. – CodeCaster May 27 '15 at 12:21
  • I don't see anything about folder in question. Solution is visual studio solution, a output binaries are not included into VS solution. – realnero May 27 '15 at 12:26