The MSIL Assembler generates a portable executable (PE) file from Microsoft intermediate language (MSIL). You can run the resulting executable, which contains MSIL and the required metadata, to determine whether the MSIL performs as expected.
Questions tagged [ilasm]
76 questions
2
votes
1 answer
Can you see the evaluation stack in mdbg?
Say I have the following CIL:
ldc.i4 40 <- a breakpoint is set here
ldc.i4.2
add
box int32
call void [mscorlib]System.Console::WriteLine(string)
I then use ilasm /debug main.il to assemble the exe and pdb files to use in mdbg.
My question is, when…

Andreas Grech
- 105,982
- 98
- 297
- 360
2
votes
2 answers
Ilasm.exe missing after repair of .net
I have repaired .net 4.0 but (still) cannot find:
Ilasm.exe
Any ideas? I need it to do this:
strong name signing of assembly

cs0815
- 16,751
- 45
- 136
- 299
2
votes
1 answer
How to load static field?
I am generating a Type with static fields num1, num2, etc. via Reflection.Emit.
Now I do not know how to emit code which loads the contents of a static field in the generated type onto a static method's evaluation stack.
What I have tried so far…

user35443
- 6,309
- 12
- 52
- 75
1
vote
1 answer
How do I Obtain Code Coverage on Assembly after ExportDll has run it through ildasm/ilasm?
I'm using a post-build step on my C# assembly to expose a function signature from my dll. This step uses the ExportDll tool from http://www.codeproject.com/KB/dotnet/DllExport.aspx. However, if I run my dll through mstest and attempt to get a code…

villecoder
- 13,323
- 2
- 33
- 52
1
vote
1 answer
Are there any commerical or open source IDEs that have built-in support for compiling ILASM files?
Are there any IDEs out there apart (from Visual Studio) that will let you build IL assembler files right out of the IDE?

plaureano
- 3,139
- 6
- 30
- 29
1
vote
0 answers
Correctness of adding int32 and int64 in IL
Working on custom interpreter of IL code I've noticed that the following code can be compiled by ilasm.exe and executed well:
.locals init (int32 x, int64 y, int64 z)
ldloc x
ldloc y
add
stloc z
But in the ECMA-335 (unfortunately I can't insert a…

Artem Razin
- 1,234
- 8
- 22
1
vote
1 answer
Can a LocalVarSig have multiple constraint attributes?
In LocalVarSig syntax diagram the CustomMod and Constraint elements are in a loop, so this means there can be multiple Constraint elements. If there are more than one Constraint element, what is its semantics? Thanks!

tairqammar
- 151
- 3
- 10
1
vote
1 answer
ildasm / ilasm - Symantec false positive
I am having a problem with disassembling and reassembling a .NET executable and it throwing a false positive after.
The error I get specifically is:
Heur.AdvML.B
As of now, I am no longer editing the asm prior to re-compiling it. I literally…

netdev
- 21
- 2
1
vote
1 answer
Where is ilasm.exe in Microsoft.NETCore.ILAsm?
I need the most recent ilasm.exe. I thought it would be the one from https://www.nuget.org/packages/Microsoft.NETCore.ILAsm/
However, the downloaded microsoft.netcore.ilasm.2.0.0.nupkg archive doesn't contain any .exe or .dll files.
I don't get how…

Alex
- 2,469
- 3
- 28
- 61
1
vote
3 answers
Whats the relation(if any) of MASM assembly language and ILASM?
whats the relation(if any) of MASM assembly language and ILASM. Is there a one to one conversion? Im trying to incorporate Quantum GIS into a program Im kinda writing as I go along! I have GIS on my computer, I have RedGate Reflector and it nor…

CDUB
- 49
- 3
1
vote
0 answers
MSIL: Simple custom Code says Invalid IL code - System.InvalidProgramException
I'm trying to learn more about .NET MSIL and so I wanted to write my custom IL Assembly. I got stuck with the following example.
First I am on OSX, using Mono "Mono JIT compiler version 4.8.1 (mono-4.8.0-branch/22a39d7 Fri Apr 7 12:00:08 EDT 2017)"…

Steven
- 11
- 1
- 2
1
vote
1 answer
MSIL assembly: Unexpected OutOfMemoryException in class constructor
I'm writing a compiler that outputs .NET assemblies (using Mono.Cecil, although I don't believe Cecil is relevant to this problem). One of the compiler features requires that a class will have a compiler-generated nested class with some support…

DJC_ksd
- 31
- 4
1
vote
0 answers
ECMA CLS standard indicates TypeSpec is optional for a property getter/setter but ilasm complains
According to page 196 of the CLR ECMA standard doc, the following is the MSIL grammar for defining a class property getter.
.get CallConv Type [ TypeSpec ‘::’ ] MethodName ‘(’ Parameters ‘)’
.get specifies the getter for this property. The…

codenheim
- 20,467
- 1
- 59
- 80
1
vote
0 answers
Does ILASM work with Mixed Mode Application?
I am trying to modify a method in a third-party dll
Use ILDASM to generate IL
Modify IL method
Use ILASM to generate DLL (FAILURE)
I found the reason due to this error is the third-party dll contains unmanaged code.
Is there any way that I can…

CreateChen
- 19
- 5
1
vote
1 answer
Syntax error at token MZ using ilasm
I have a prebuilt dll assembly that I am trying to use. It is a winforms library and when I reference it I can use it in the designer/code without error. When I run it I get:
Assembly generation failed -- Referenced assembly 'YARTE' does not have a…

Cameron Scully
- 103
- 1
- 12