Questions tagged [ngen]

The Native Image Generator (Ngen.exe) is a tool for the .NET framework that improves the performance of managed applications by creating and caching processor-specific machine code, so that just-in-time compilation is no longer necessary.

From Native Image Generator (Ngen.exe) on MSDN:

The Native Image Generator (Ngen.exe) is a tool that improves the performance of managed applications. Ngen.exe creates native images, which are files containing compiled processor-specific machine code, and installs them into the native image cache on the local computer. The runtime can use native images from the cache instead using the just-in-time (JIT) compiler to compile the original assembly.

160 questions
0
votes
0 answers

Ngen error - cannot find GAC dependency

I'm trying to use NGen to speed up the startup/response times for a .Net app. The application compiles (in Visual Studio) and runs happily inside and outside the IDE, but if I 'ngen' the main entry assembly, I get this: Failed to load dependency…
haughtonomous
  • 4,602
  • 11
  • 34
  • 52
0
votes
1 answer

Ngen native image is not getting loaded if current directory is changed at runtime

So I have NGENed one assembly and but it is not being used by runtime, because at runtime current application directory is changed like Directory.SetCurrentDirectory(requiredDirectory) so Ngen assembly is not being used by runtime. How are we…
Kamal Kr
  • 687
  • 1
  • 10
  • 22
0
votes
1 answer

Is it advisable to add assemblies from nuget like Microsoft.Bcl.Async to the GAC and ngen them?

Startup performance may be improved by having most assemblies ngen-ed and in the GAC, but for whatever reason I haven't come across recommendations to do this?
eug
  • 1,118
  • 1
  • 16
  • 25
0
votes
1 answer

Calculate working space savings when using NGEN

I am currently trying to calculate whether NGEN would have any benefit for our .NET client in terms of memory savings when running on a Citrix farm. My primary reference is the following…
sger6218
  • 397
  • 1
  • 13
0
votes
1 answer

How to debug a TypeLoadException during ngen

Situation I'm using ngen to create native images of my assemblies during the installation. This worked fine until recently and I've no idea what broke it. Sadly the ngen output isn't very helpful. It just says that it couldn't find or load a type,…
cremor
  • 6,669
  • 1
  • 29
  • 72
0
votes
1 answer

How to build native image for Win32 using C# and ngen.exe

Is it possible to build from C# a native application like when you are using plain C/C++ and developing for Win32. I've heard about ngen.exe and try to use it... But I don't understand what's it doing? It like it does cache the application is some…
Secret
  • 2,627
  • 7
  • 32
  • 46
0
votes
1 answer

Which ngen.exe should i use when using supportedRuntime element in app.config?

I'm bundling the ngen.exe for .net 2.0 and .net 4.0 with my .net 3.5 application inside NSIS installer. I don't find any other method to do it so i'm bundling it. I have following in my app.config file.
Ravi Patel
  • 2,136
  • 3
  • 32
  • 48
0
votes
0 answers

How does Process Explorer determine the Assemly Flags?

Does anybody know how Process Explorer determines these flags shown here? Is there a .NET Api for this? I am especially interested in the Native flag. I tried determine this on the CodeBase or Location property. But these seem to return always only…
mklein
  • 1,787
  • 1
  • 15
  • 18
0
votes
1 answer

Can one persist MPGO data between builds?

I've just read a post about MPGO (Managed Profile Guided Optimization) and the process described is: Obtain a machine with Visual Studio 11 Ultimate Beta and your application installed. Run the MPGO tool (as an administrator) with the necessary…
Motti
  • 110,860
  • 49
  • 189
  • 262
-3
votes
1 answer

Difference between java -server and ngen in c#

What would you say are the key differences when comparing Java running a jar with the -server flag and a .net assembly that has been run through ngen.exe It seems like they are trying to do the same thing for the different run-times.
maxfridbe
  • 5,872
  • 10
  • 58
  • 80
1 2 3
10
11