I am trying to use NGen to see if my application’s native images work better than .NET. However, I have a bit of trouble figuring out what to do.
My application is called MyApp.exe and has several dependency libraries.
I opened the VS 2010 command prompt and ran:
ngen install MyApp.exe /Profile
The output from the command did not suggest that there were problems.
Then I switched to C: \ Windows \ assembly to try to run the EXE, but I could not find it (I am on Windows 7). A little bit about digging told me to use the command line to view in C: \ Windows \ assembly \ NativeImages_v4.0.30319_32. In the end, I was able to find my MyApp.ni.exe file, but, of course, I could not open the containing folder in Explorer.
I tried to run the program and they told me:
"C: \ Windows \ assembly \ NativeImages_v4.0.30319_32 ... \ MyApp.ni.exe is not a valid Win32 application."
The command output indicated by Access is rejected.
I had two questions:
- How to run this program so that I can run my own version.
- How can I profile it? It seems that I can not find this folder from the VS2010 profiler, because it can not be seen in Explorer.
Thanks.
sohum source share