• Advertisement

Archived

This topic is now archived and is closed to further replies.

C# Instalation Time Compiling

This topic is 5529 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

how is this done? i have visual studio .net pro. when i make a c# program and then use windows installer to make an installation program for it, it doesnt give me that option. i have "Inside C#" by Tom Archer and he says its posible but doesnt explain it. i dont want my program to be JIT''ed, i want it all compiled at installation time. also, how do you make windows installer check to see if .NET is installed and then install it if nessecary? thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
I''ve been trying to figure out this kind of stuff, too... haven''t found it yet.

I''ve found several command-line utilities that might have something to do with that though...

NGEN.EXE -- native code generator
GACUTIL.EXE -- global assembly cache utility
SN.EXE -- strong name utility (you need a strong key to get accepted into the glocal cache)

I''ve made a strong-named .exe and put it in the GAC, n-gen''ed it, rebooted, and it still takes 2 seconds longer to load the first time.


Other than in a couple of books (like you found), I haven''t seen *any* reference to specifying JIT-time.

Share this post


Link to post
Share on other sites
jharkey, if you decide to pre-jit (which as Nypyren says is done by using ngen.exe), be aware of the performance impact it could have. While the time to load your application will decrease, the run-time performance will suffer. The JITter can do optimizations, such as cross-assembly optimization, that isn''t possible if the applicaiton is pre-JITted. Future versions of the JITter will do even more optimizations. If you look at the System.* assemblies, only a few of them are pre-JITted. If you want your GUI to show quickly, that might be a valid reason to pre-JIT.


ngen.exe: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/html/cpgrfnativeimagegeneratorngenexe.asp

pre-jit during install: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vxwlkWalkthroughUsingCustomActionToPrecompileAssermblyDuringInstallation.asp

Share this post


Link to post
Share on other sites
PreJIT your splash screen. Everything else can wait



For those who believe in God, most of the big questions are answered. But for those of us who can''t readily accept the God formula, the big answers don''t remain stone- written. We adjust to new conditions and discoveries. We are pliable. Love need not be a command or faith a dictum. I am my own God. We are here to unlearn the teachings of the church, state, and our educational system. We are here to drink beer. We are here to kill war. We are here to laugh at the odds and live our lives so well that Death will tremble to take us -- Charles Bukowski

Share this post


Link to post
Share on other sites

  • Advertisement