Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Am I running as a native image?

Am I running as a native image?

Scheduled Pinned Locked Moved .NET (Core and Framework)
comquestionc++dotnet
2 Posts 2 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    solidstore
    wrote on last edited by
    #1

    I have several assemblies that have been registered for COM Interop but have not been installed into the GAC. There are all installed side-by-side in my application directory. One of the assemblies is a Windows Service exe. Things have been working fine but occasionally the service fails to start. I was wondering if this was due to the long startup time caused by the JIT compliation. I have now tried using Ngen to pre-compile all the assemblies. I see that they now appear in the GAC and have a cache type of ZAP? My question is - can I tell programmically if I'm using the native images I've just created? If not, can I verify that application is using the native images? How does the runtime find the native images? Especially the service which is configured to point at the original exe?

    S 1 Reply Last reply
    0
    • S solidstore

      I have several assemblies that have been registered for COM Interop but have not been installed into the GAC. There are all installed side-by-side in my application directory. One of the assemblies is a Windows Service exe. Things have been working fine but occasionally the service fails to start. I was wondering if this was due to the long startup time caused by the JIT compliation. I have now tried using Ngen to pre-compile all the assemblies. I see that they now appear in the GAC and have a cache type of ZAP? My question is - can I tell programmically if I'm using the native images I've just created? If not, can I verify that application is using the native images? How does the runtime find the native images? Especially the service which is configured to point at the original exe?

      S Offline
      S Offline
      Stephane Rodriguez
      wrote on last edited by
      #2

      solidstore wrote: I was wondering if this was due to the long startup time caused by the JIT compliation May be. solidstore wrote: have now tried using Ngen to pre-compile all the assemblies You have pre-jitted one or more assemblies so the resulting images are stored in the GAC for future reference. Without pre-jit, assemblies are jitted on-the-fly in memory. solidstore wrote: My question is - can I tell programmically if I'm using the native images I've just created? This question sounds weird. You are always using native images, whether they are from the GAC, or from in-memory jitted images. What's more interesting to the issue is what is the relationship between an assembly in a private folder referrenced by a main assembly, with the same assembly stored in the GAC : in other words, which assembly is used ? The answer is it has a lot to do with versioning rules and strong names. My recommendation is to read Jeffrey Richter's "Applied .NET framework programming" book. It's all there.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups