0

I try to do the following:

Put a complete program to gac and start it from there.

I tried:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\ngen install C:\GacTest\test.exe

The output said a lot with compiling assemblies which looked good - references classes should be bundled with application.

But how can I now start the application from GAC? As .net4.5 32 bit application i assumed that there would be a folder C:\Windows\Microsoft.NET\assembly\GAC_32\test - but there isn't

ngen display ..\text.exe 

shows the original folder as ngen roots and a native image called Text, Version..., Culture

Maybe some information why I want to use ngen: An application needs a long startup time which should be reduced. On different places there is the information that ngen could speed up the startup time. If i try just the install as above and start from application directory - the startup time is neither changed to better or worse and I just don't know wether precompiled GAC version or jitted version is used. (That would be the bonus question - how do i know which one is used?)

Offler
  • 1,223
  • 1
  • 12
  • 34
  • Your assumptions are incorrect, they don't otherwise give you a magic button to speed-up the start of your program. If ngen doesn't improve your warm-start time then it isn't the jitter that slows you down. And do keep in mind that ngen makes cold-start delays worse. Use a profiler to find the cause. – Hans Passant Apr 27 '15 at 09:35
  • @HansPassant doesn't ngen precompile so that jit time should be reduced? How do I know if really the ngen'd version is the one which gets started? – Offler Apr 27 '15 at 11:46
  • How do you know it doesn't? You can use Fuslogvw.exe and log all binds for the native images. Also note that 4.5.2 already automatically uses ngen without having to help on Win8 so not seeing any difference at all is normal. – Hans Passant Apr 27 '15 at 11:50
  • @HansPassant Add. Info: Windows 7. I read ngen would only be used on 8 for frequent used applications. I will take a look at Fuslogvw – Offler Apr 27 '15 at 12:13

0 Answers0