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
1
vote
0 answers

Running Ngen on EntityFramework.Dll v 6.1 produces error windows 10

I am running Ngen on my EntityFramework.dll version 6.1 as Entity Framework does not come in the default installation of the .net Framework. Therefore, the EF assembly is not NGEN'd which means that EF code needs to be JITTED each time the…
MicroMan
  • 1,988
  • 4
  • 32
  • 58
1
vote
0 answers

Why Ngen didn't work when the code use Assembly.LoadFrom

I'm using ngen to install native image of an exe. In the code i use Assembly.LoadFrom("MyLib.dll"), so i need also to install their dependencies. I checked on Doc and i found ngen install c:\myfiles\MyLib.dll /ExeConfig:c:\myapps\MyApp.exe But…
miloud
  • 109
  • 1
  • 1
  • 6
1
vote
0 answers

How to install ngen dependencies?

I'm using ngen to install native image of an exe but i need also to install their dependencies when i try ngen install c:\myfiles\MyLib.dll /ExeConfig:c:\myapps\MyApp.exe I get the following errors Could not load file or assembly xxx or one of its…
miloud
  • 109
  • 1
  • 1
  • 6
1
vote
1 answer

VS2010 profiler seems to not resolve symbols from ngen'd images

I'm profiling a Windows service by attaching to it in the 'sampling' mode. I open the results file, the "functions" view and I see the "hottest" function being displayed as [System.Runtime.Serialization.ni.dll] without indication of the concrete…
jkff
  • 17,623
  • 5
  • 53
  • 85
1
vote
1 answer

Extracting pdb from mscorlib.ni.dll using ngen or other tools

I am trying to get pdb from mscorlib.ni.dll but in all conditions it fails. I used the ngen.exe from the pc that supports "createpdb" options. To be sure, I ran all the ngen versions with all the mscorlib.ni.dll versions. Il all cases, I end up with…
Nadzzz
  • 530
  • 3
  • 12
1
vote
0 answers

Using ngen.exe without administrator privileges, is it possible?

Is it possible to use the Native Image Generator (ngen.exe) without administrator privileges? The MSDN documentation says that you need administrative privileges. Remarks: To run Ngen.exe, you must have administrative privileges. As far as I know,…
Daniel Peñalba
  • 30,507
  • 32
  • 137
  • 219
1
vote
2 answers

New dll's are not used with precompiled code using NGen

We have a hybrid VB6/Net application in which the Net dll's are hooked up to the VB6 code using a Com Visible Net wrapper. This wrapper in its turn is activated using RegFreeCom with manifests. This setup is working for us for over 2 years. To…
Dabblernl
  • 15,831
  • 18
  • 96
  • 148
1
vote
2 answers

Does jitting happen every time a .NET application runs?

When I install a .NET application, I understand that it will get jitted. My question is does this jitting happen everytime I will run this application or does it happen only the first time? If it happen only first time, where can I find jitted…
crazy novice
  • 1,757
  • 3
  • 14
  • 36
1
vote
2 answers

For how many types of x86-processors do Ngen and .net-native create native code at once?

As long as there's .net installed - I understand that the IL code just lets .net take care of the different types of CPU's. But when we consider native code - as far as I understand (and please correct me if I'm wrong) - the code has to be compiled…
ispiro
  • 26,556
  • 38
  • 136
  • 291
1
vote
1 answer

NServiceBus.Host, NGen and LoadFrom

We have a "smallish" NServiceBus application(s) that use a dozen EF mapped tables and RabbitMQ as communication medium. With NServiceBus.Host.Exe startup of the application takes ~26s (debug and release versions both, with or without debugger…
Pasi Savolainen
  • 2,460
  • 1
  • 22
  • 35
1
vote
1 answer

Running "ngen install EntityFramework.dll" fails with error 0x800706BE and 0x80131F06

As advised by the Entity Framework Team I've tried to create a native image of EntityFramework.dll with this command: ngen install packages\EntityFramework.6.1.0-beta1\lib\net40\EntityFramework.dll this results in the error 0x80131F06 (no native…
magicandre1981
  • 27,895
  • 5
  • 86
  • 127
1
vote
0 answers

Generate native image for assembly, but skip strong name verification

Possible Duplicate: Converting .net exe to native win32 exe? I have an assembly installed into the GAC that has been modified using reflexil and it is registered for strong name verification skipping using the sn -VR *,. The…
Mihail Shishkov
  • 14,129
  • 7
  • 48
  • 59
1
vote
1 answer

Ngen error because "Mscorlib.dll does not have a native image" (x64 only, .NET 4.0 only)

I'm trying to generate a native image of my .NET 4.0 application using Ngen using a 64-bit Windows 7. When Platform is set to x64 (or Any CPU) - Ngen fails, complaining that 'NGen cannot proceed because Mscorlib.dll does not have a native…
ispiro
  • 26,556
  • 38
  • 136
  • 291
1
vote
1 answer

Generating ARM code for a managed assembly on an Intel machine

Directly related to this question. Given a managed assembly for Windows Phone, how can I generate native code for it for an ARM CPU? I don't have a Windows/ARM device (neither tablet nor a phone). There's the ngen utility out there, but AFAIK it can…
Seva Alekseyev
  • 59,826
  • 25
  • 160
  • 281
1
vote
1 answer

NGen and generic collections. How to get rid of Jitting?

I'm struggling with ngen and generic collections. I've ngen'ed all my assemblies in solution, but still somehow jitting is occurred every time my app is executing that code: private Dictionary VerifyedFunc; public SecurityProvider() { …
nikita
  • 2,737
  • 2
  • 20
  • 26