title: Can Ngen be used for code security?
body: <p>Can Ngen be used as the perfect Code Obfuscator, protecting your .NET CIL from ever reaching the client?</p>
  
  <p>Can I run Ngen on my dev PC and ship the exe to every client that has a compatible .NET framework version? (assuming both are x86 or x64) What are the differences between Ngen'd exe's across machines? </p>
  
  <p>I know the latest Ngen generates an exe that contains the IL + Native code, which can be extracted and "converted" back to source code using something like Reflector. However, the <a href="https://stackoverflow.com/a/7373328/1294758">ngen for .NET framework 1.1</a> <strong>strips out</strong> the IL in the generated exe, making it a possible choice for code security if you use .NET framework 1.1. </p>