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.
:)
2 4786
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
Sign in to post your reply or Sign up for a free account.
Similar topics |
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 a setup package, create a batch file (specifying the ngen
commands) run the install, call the batch file from within the setup program
and run...
|
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 both methods precompiled, I believe I
can do
ngen A.dll B.dll
|
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,
|
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 precompile it? a) before installing
the application on the client computer or b) after installing the
application on the client computer?
thanks
|
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 produces
cannot be shared between App Domains"
I'm afraid I'm not sure what an App Domain is in this context, but we don't
have a web farm/web...
| |
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 would like to know if this process can be a cause of slowing down
performance of a high speed application. The installer of this
application
|
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 persisting across reboots or extended
times between application launches.
Currently I am NGen'in my code right after a .MSI install, and everything is...
|
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 persisting across reboots or extended
times between application launches.
Currently I am NGen'in my code right after a .MSI install, and everything is...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |