Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7762889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:31:30+00:00 2026-06-01T14:31:30+00:00

Our app, distributed via ClickOnce, takes 10.8 seconds on average to start up. After

  • 0

Our app, distributed via ClickOnce, takes 10.8 seconds on average to start up. After running ngen on the .exe (in the directory that ClickOnce installed it into), it starts up in 6.4 seconds on average. This is obviously a huge speedup (40%) and I would like to make use of ngen-ification if possible.

Ron’s answer to Is it possible to use NGen with ClickOnce deployment? shows how it can be done on the customer’s machine, assuming I guess he runs Windows XP, as it wants Administrator rights on my Windows 7 box, so that does not seem like a generic solution.

Furthermore, ngen takes 40 seconds on my box to compile all assemblies belonging to that app.

So ideally, I’d like to pre-ngen our app for all (major) architectures as part of the build process, so it could be shipped to the customer without the user having to accept an “ok to execute as admin?” popup and then wait 40 seconds.

Is that possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T14:31:31+00:00Added an answer on June 1, 2026 at 2:31 pm

    You can’t do this without administrative access on Windows 7.

    The problem isn’t the actual ngen generation of the native image but the installation into the native image cache (C:\windows\assembly\nativeImages_v#xxxxxxxxx) that requires administrative permissions. So even if you found a way to pre-generate the native images for all the target architectures you would not be able to get them into the appropriate location for the runtime to consider using them.

    You can’t just place them side-by-side with your regular binaries because then they wouldn’t be managed properly–you’d get into trouble when certain security policy changes are made, .net framework updates are applied or other changes are made to referenced assemblies that invalidate the native images and would require an “ngen update” command to be run. Microsoft just doesn’t appear to support the use-case of ngen with ClickOnce deployment at this time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our app uses a component that requires a license file in the directory with
One of the ways our app is distributed (on Windows) is as a ZIP
Our (internally distributed) iOS app relies on iOS 4.2's encryption to secure sensitive data.
I have a task to create a desktop version of our web app that
Our team develops distributed winform apps. We use ClickOnce for deployment and are very
Using the Inno installer, we distribute the VC++ redistributable with our app so we
Our app runs in jvm 32 bit, even when in windows x64. Now, at
Our app servers (weblogic) all use log4j to log to the same file on
Our app uses a string to house character-values used to indicate enum values. for
Our app supports different browser version from IE to Firefox to Chrome. Now, some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.