none
1) Is NGEN run by the developer before distributing the App? 2) Is the MSIL code also included in NGEN distributions of the APP? RRS feed

  • Question

  • 1 - Is NGEN run by the developer to convert the application to native code before the app is distributed - or - is it run by the users machine on the first run of the application?

    2 - In an "NGEN'd" distribution of an application... is the MSIL code also included?

    ... Reason for the question... Read that

    " with one major exception. The .NET runtime also keeps track of any dependencies for your assembly and if anything changes, the CLR runtime also automatically switches back to the IL version of your program."

    from this online article: http://visualbasic.about.com/od/FWTools/a/FWToolsNGEN.htm 

    3 - Are the DLL's VB create also (normally) distributed MSIL code?

    4 - Is there anyway to write programs with VB .Net that can be completely compiled by the developer into native language... no MSIL in the distribution package?

    Thanks for any help.

    • Moved by Mark Liu-lxf Tuesday, March 6, 2012 2:40 AM CLR (From:Visual Basic Express Edition)
    Sunday, March 4, 2012 2:53 PM

Answers

  • 1. Usually it doesn't run at all. Unless the installer makes it run. Then it runs on the target machine. It can not run before, because, as I said in your other thread, it wouldn't even know if it has to compile to 32 or 64 bits.

    2. There is no Ngen'd distribution.

    3. Everything based on the .Net Framework is IL code. Optionally, it can be Ngen'd on the target machine.

    4. No.


    Armin

    Sunday, March 4, 2012 3:18 PM

All replies

  • 1. Usually it doesn't run at all. Unless the installer makes it run. Then it runs on the target machine. It can not run before, because, as I said in your other thread, it wouldn't even know if it has to compile to 32 or 64 bits.

    2. There is no Ngen'd distribution.

    3. Everything based on the .Net Framework is IL code. Optionally, it can be Ngen'd on the target machine.

    4. No.


    Armin

    Sunday, March 4, 2012 3:18 PM
  • Thanks Armin. I've done a lot of reading so your direct answer helped clear up my mis-understandings.

    BTW, there is a good article on...

    "Assessing and managing Security risks unique to Java and .net" by Sebastian Holst here...

    http://www.preemptive.com/images/stories/white_papers/Risks_Unique_to_Java_and_NET_ISSA1109.pdf

    But it was written back in 2009 &  a lot could have changed since then.

    I've got a few questions about obfuscatio and Dotfuscator but I'll start a new thread on that with a topic specific subject.

    Look for it.

    And thanks again for your help.

    Sunday, March 4, 2012 5:45 PM