ilasm

ILASM for Compact Framework?

I'm working with Linq expression trees (from the db4o/Mainsoft/Mono port) on the Compact Framework. Since System.Reflection.Emit doesn't exist, I can't compile my LambdaExpressions into delegates, which I want to do for performance reasons. I thought maybe I could transform my expression tree into IL and basically provide the missing Em...

Problem with ilasm

I have a quite big program in .net 3.5 SP1 which is compiling just fine. However when I want to obfuscate it with Obfuscator Pro (evaluation for now), Obfuscator stops with the following error: [Build Output] This application has requested the Runtime to terminate it in an unusual way. [Build Output] Please contact the application'...

.NET compiler - CLR assembly metadata access / reflection from non-managed C++

I have a compiler that targets the .NET runtime (CLR). The current version of the compiler is written in standard C++ (non-managed). The compiler currently lacks support to reference assemblies at compile time, so the way I "import" .NET libraries is with a utility stub generator that is written in .NET, which reflects any assembly and e...

How to disable ILASM warnings

Hi. Does anybody knows if there is a way to tell ilasm to completely ignore warnings when compiling an il file?? I know it is possible somehow, by inserting "something" inside the il code. But what? A ilasm command line parameter would come in handy too Thanks! ...

Compile IL code at runtime using .NET 3.5 and C# from file

I would like to take a file that is an IL file, and at run time compile it back to an exe. Right now I can use process.start to fire off the command line with parameters (ilasm.exe) but I would like to automate this process from a C# service I will create. Is there a way to do this with reflection and reflection.emit? While this ...

Defining custom attributes in CIL

What is the syntax for defining an array literal in CIL for the purposes of decorating a member with a custom attribute? I am writing some .NET code in CIL (using ilasm.exe to compile it) and I need to decorate a method with a custom attribute. The constructor for that attribute takes an array of integers as its only parameter. How can ...

Missing graphics when disassembling and re-assembling .net program

I have a piece of software. When I disassemble the PE file ildasm foo.exe /output=foo.il I get a bunch of files, like foo.MainForm and foo.bar.dll. When I then try to re-assemble the file ilasm foo.il I get a working foo.exe back again, but some of the small graphics are missing in the new file (it's also ~200kb smaller). Some othe...

.NET Framework 4 ilasm targeting framework 2

Hi! Question: I need to create, USING ILASM.EXE, framework 2.0 assemblies. So far, I have seen that fw 2 ilasm: creates 2.0 assembies. FW 4 ilasm, on the other hand: creates 4.0 assemblies. So far I am cool. Now I need to know: is there a way (perhaps an argument) that can be used to make fw 4 ilasm to create fw 2 assemblies? Thank y...

How might I strongly sign an external DLL while retaining its assembly metadata?

I have a few libraries I use in my project that are unsigned. Because my application is strongly signed, the libraries must be as well. I sign these libraries using: "%PROGRAMFILES%\Microsoft SDKs\Windows\v7.1\Bin\ildasm.exe" /nobar /all /out=library.il library.dll "%WINDIR%\Microsoft.NET\Framework64\v4.0.30319\ilasm.exe" /dll /key=My...