When you somehow want to fix a business need and there is no way out, you may have to resort to this method. I have a few links here which will be of use in that case because I had to do this recently: http://social.msdn.microsoft.com/Forums/en-US/msbuild/thread/05b3cf5d-ead3-4274-88f5-6e8cbda8e8d8/ An intriguing thing I found out that looks like valid C# gets converted into IL and gets decompiled - but when you get the source code like this, it may not compile properly, because apparently, the C# compiler does not like many things in this decompiled code which probably is optimized out of the IL. So, you need to look at each case and work around it. You may have to use keywords like unchecked, new, etc. In some cases, you may have to explicitly cast objects (see how the code is in the decompiler and then figure out that it needs to be cast to X or Y class). If you deal with this dll being a wrapper around C++ dlls which are called from within them, the following links will be