NGEN
.NET (Core and Framework)
1
Posts
1
Posters
0
Views
1
Watching
-
Is it possible to detect whether or not you are running from an NGEN'ed assembly or not? I ask because as a side-effect of an NGEN experiment, I found that I can NGEN a running application without any problems. Given that my assembly runs a bit faster NGEN'ed than not, I'd like to detect whether or not the .NET Framework has detected that my assembly is no longer NGEN'ed, and if it is not, NGEN it for next time the assembly is launched. While the NGEN executable is able to detect whether or not your assembly has been NGEN'ed and does a quick exit if it has, I don't want to waste the cycles creating the process if I don't have to.