Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. how to execute ngen output .ni.exe file

how to execute ngen output .ni.exe file

Scheduled Pinned Locked Moved .NET (Core and Framework)
c++performancehelptutorialquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Andrew Shapira
    wrote on last edited by
    #1

    I am doing performance measurements and would like to use a native executable to avoid having JITs occur during performance timing. How does one execute an ngen-generated executable? There are blogs and MS documentation everywhere that talk about how to use ngen, but I have not found a single place that says how to execute an ngen-executable! :mad: Here is what I tried. Compile: % csc helloworld.cs Then install in the global assembly cache: % ngen install helloworld.exe Then go to the assembly cache and try to execute: % cd c:\windows\assembly\helloworld\[hex string] % ./helloworld.ni.exe This gives the error message: c:\windows\assembly\helloworld\[hex string\helloworld.ni.exe is not a valid WIN32 application.

    S 1 Reply Last reply
    0
    • A Andrew Shapira

      I am doing performance measurements and would like to use a native executable to avoid having JITs occur during performance timing. How does one execute an ngen-generated executable? There are blogs and MS documentation everywhere that talk about how to use ngen, but I have not found a single place that says how to execute an ngen-executable! :mad: Here is what I tried. Compile: % csc helloworld.cs Then install in the global assembly cache: % ngen install helloworld.exe Then go to the assembly cache and try to execute: % cd c:\windows\assembly\helloworld\[hex string] % ./helloworld.ni.exe This gives the error message: c:\windows\assembly\helloworld\[hex string\helloworld.ni.exe is not a valid WIN32 application.

      S Offline
      S Offline
      Scott Dorman
      wrote on last edited by
      #2

      If I remember correctly, you still run the "normal" helloworld.exe file. The runtime will figure out that you have a corresponding native image and use that instead.

      ----------------------------- In just two days, tomorrow will be yesterday.

      A 1 Reply Last reply
      0
      • S Scott Dorman

        If I remember correctly, you still run the "normal" helloworld.exe file. The runtime will figure out that you have a corresponding native image and use that instead.

        ----------------------------- In just two days, tomorrow will be yesterday.

        A Offline
        A Offline
        Andrew Shapira
        wrote on last edited by
        #3

        I tried that before posting - I don't think it works. The md5 sum of helloworld.exe is unchanged by running "ngen install helloworld.exe".

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups