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.

158 questions
0
votes
0 answers

It has no effect after compiling exe by Ngen

I have a WPF application. For faster Startup, I use Ngen. %WINDIR%\Microsoft.NET\Framework64\v4.0.30319\ngen install MyApplication.exe I have some computer, Windows Embedded Standard, x64. Some are getting faster, others are not. What is the…
0
votes
0 answers

"has Stopped working" message after IL Assembly editing

I am using "dnSpy" application to read and change .net assembly exe module, I chose "Edit IL Instructions..." like that Then I change "brtrue" to "brfalse" as this picture Then I saved a module like that Then I run NGRN like that Now When I…
JustMe
  • 5,580
  • 3
  • 17
  • 16
0
votes
0 answers

Different result from script ran as Scheduled Task

Running a script to install Powershell Native Images to boost performance. I would like to automate this across my entire environment, but if it's ran as a remote job, or scheduled task, or even psexec, it only installs three of the assemblies. If I…
barry
  • 5
  • 1
  • 2
  • 4
0
votes
0 answers

NGEN.exe how to control?

how can I stop using ngen.exe on my windows 10. I want to control all the libraries that are generated. Every time I monitor the libraries a new library appears with the extension .ni.dll.
0
votes
0 answers

What determines the assembly identity for ngen lookup?

How does ngen lookup native images? Example 1: I compile MyApp.exe v1.0.0.0 in C:\Test\MyApp\bin\Debug\MyApp.exe . I ngen MyApp.exe via ngen install MyApp.exe. After this ngen display MyApp will tell me that I have an NGen root at the full path…
Anders Forsgren
  • 9,992
  • 4
  • 34
  • 70
0
votes
1 answer

Disable the on-demand ngen.exe on lightweight windows servers (".NET Framework NGEN v4.0.30319 64")

We're deploying .Net4-based asp.net apis to a large number of windows servers, and in order to keep aws costs low, we run them as small as possible. The problem we're seeing is that after the vm is provisioned and code is deployed, we're seeing high…
Trondh
  • 2,801
  • 1
  • 18
  • 25
0
votes
1 answer

What is the list of all NGen artifacts that we should add to our UWF write filter exceptions list?

I know that Ngen places its assemblies in C:\windows\assembly\NativesImages_*. But I also know that it keeps track of the references for each assembly so that if B and C depends on A then uninstalling B doesn't uninstall A. This makes me conclude…
TommyD
  • 617
  • 6
  • 11
0
votes
1 answer

NGEN queue 1 never runs

I'm NGEN-ing some dlls in my application. I'd like to do this as part of my installer, but I'd like it to occur in the background as there's no need to make the user wait for this to complete. If I run the following command it generates the native…
anakic
  • 2,281
  • 1
  • 25
  • 28
0
votes
0 answers

System.Numerics.Vector.IsHardwareAccelerated = false when using ngen.exe

System.Numerics.Vector.IsHardwareAccelerated is set to true when I debug my application in Visual Studio. If i install my program and run ngen.exe (Native Image Generator) to speedup startup then System.Numerics.Vector.IsHardwareAccelerated is…
andy.e
  • 160
  • 8
0
votes
0 answers

How to avoid NGEN?

My application requires my to sign all referenced .dlls with a certificate. Unfortunately, .dlls like System.dll are being compiled as native images and I'm unable to sign them. Is there a way to disable NGEN and use local versions of these .dlls…
0
votes
0 answers

NGEN for Clickonce with Framework 4.5

Referring the link use-ngen-with-clickonce-deployment how can i use NGEN for dot net application developed in framework 4.5. I used the code in this link but there is no change in performance. please share the code and help.
0
votes
1 answer

Why IIS doesn't load ngen assemblies in w3wp process on Windows Server 2012

I've found the problem that IIS didn't load ngen assemblies (.ni - native images) on Windows server 2012. So it loads them from GAC and JIT them in every process. I know that native images can be shared across processes, so there is no cost for JIT…
StuS
  • 629
  • 4
  • 14
0
votes
1 answer

NGen ASP.NET to save memory - Native Image not used

We have a web application which we host, where we deploy the same application to 100+ "tenants" on the same machine(s). Managed DLL's memory is not shared between processes by default, that means we load the same DLL 100+ times into memory. Goal is…
MichelZ
  • 3,456
  • 4
  • 25
  • 33
0
votes
2 answers

Why JIT if we have NGEN

Why do CLR need JIT compiler to complie IL to machine code when it has NGEN that does that work at the time of installation. One more question, how JIT will complie IL code if it is already NGENed?
Imad
  • 6,340
  • 6
  • 41
  • 96
0
votes
0 answers

What are the NGEN artifacts and where are they located?

I have a Desktop app that is distributed via a NSIS installer. During the install it runs NGEN on the host machine. Recently I got some bugs where I see a System.MissingMethodException, which I suspect is somehow related to the NGEN. I would like to…
Pinco Pallino
  • 887
  • 1
  • 6
  • 15