473,386 Members | 1,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Ngen.exe

Hi everybody.
I'm trying to use the ngen tool from framework 2.0, to accelerate the load runtime of my app.
I'll explain here what I'm doing.

First I copy&paste the ngen.exe to the Bin folder of my project (to not have to especify the path), where is the .exe of my app.

Then, in the CMD, i go to the same folder to execute the ngen, and I've tried differents ways to create the native image.

One way was create the aimages of the .exe and the .dll separatedly:
ngen MyApp.exe
ngen MyDll.dll

That creates both images.

Another way was creating at the same time.

ngen MyApp.exe, "MyDll.dll"

with the same result.

Note: I've didn't spicificated the version or the publickeytoken, cause I've readed that this is only useful when you have differents version of the same DLL.


Ok, the problem comes here. I've tried a test, generating the images and delete the DLL from the folder, to see if the executable file uses the native image of the DLL instead of the DLL file in the folder.
But the application fails to open.

I'm not sure if I've done well the native images, and I don't know exactly how to invoke them later.

I'm so noob, and don't know much about compilators and stuff like that, so, if anyone can explain to me how to use ngen I will thank a lot.

I saw the documentation of the MSDN and readed some articles from teh web, but all that was too tachnical for me. I like to try with some simple example or something for DUMMIES like me.

Thanks a lot and please, excuse my english.

:)
Dec 14 '07 #1
2 4780
radcaesar
759 Expert 512MB
Whats the error u got ?
Dec 14 '07 #2
I guess that you are talking about error when I'm trying to open the app.
That errors happens when I delete the DLL from the Bin folder to test if the executable uses the native image instead of the DLL file and execute the project.

When I execute it, windows shows me a dialog.
"MyApp has detected a problem and must close. We are sorry for the inconvenients"

that was teh translation of
"MyApp ha detectado un problema y debe cerrarse. Sentimos los inconvenientes ocasionados."

The dialog has the debugger button and "send errors" button.

I think that the error is that he can't find the DLL, but well, what I'm looking for is to use the NATIVE IMAGE of it.

I like a tutorial for dummies to explain how to create it and use it.


Thanks a lot
Dec 14 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: William Reyes | last post by:
I have a question regarding the use of ngen.exe and dedployment. I want to make sure I understand this correctly. If I create an app that has an .exe as well as a couple of .dll's. I can create...
2
by: Wol | last post by:
I have two assemblies, A.dll and B.dll. A.dll contains two methods. One method, UsesB, uses a type from B.dll whereas the other, DoesNotUseB, does not. To cache a native image of A.dll with...
2
by: JMMB | last post by:
Just a confirmation. NGen generates native code when i install the windows application on the client or when I run it for the first time? thanks,
1
by: fleimeris | last post by:
hello, i am preparing for 70-316 exam and i'm not quite sure about the answer to the following question. i want to use ngen.exe to boost the performance of my application. however, when should i...
1
by: Mark | last post by:
I was hoping to use nGen to speed up the time taken for our web site to start running. However, on the web we found this quote: "NGen is not recommend for Asp.Net because the assemblies NGen...
1
by: Sameeksha | last post by:
Hi everyone, I have observed that the ngen process appears in the list of processes in taskmgr while .net framework 1.1 gets installed. This process consumes 0-50% of cpu and 0-20K of RAM. I...
0
by: lissbpp | last post by:
Hello, Working in .Net 2.0 using NGen to speed up both my warm and cold startup load times. NGen works beautifully for my application; however, it seams that the native image cache is not...
0
by: lissbpp | last post by:
Hello, Working in .Net 2.0 using NGen to speed up both my warm and cold startup load times. NGen works beautifully for my application; however, it seams that the native image cache is not...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.