how to execute ngen output .ni.exe file
-
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.
-
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.
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.
-
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.
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".