.net - Determine if GAC'ed & NGen'ed assemblies are being used -
how determine if native images being used without loader verifing signature of assembly @ runtime, or using gac'ed assembly?
i have complex system we're experimenting ngen we're running exe folder dll's located due lot of late binding dependencies, looking @ process explorer, looks native images being used, how can sure i'm getting full benefit , eliminating loader verification step?
cheers, graeme.
update: i'm getting lots of sort of thing assembly binding log viewer:
log: [level 1]start validating il dependency mycompany.entities, version=2.0.0.0, culture=neutral, publickeytoken=7cd8595f4671c5dd. log: dependency evaluation succeeded.
and @ end
log: validation of dependencies succeeded. log: start loading dependencies load context. log: loading of dependencies succeeded. log: bind native image succeeded. native image has correct version information. attempting use native image c:\windows\assembly\nativeimages_v2.0.50727_32\mycompany.mylibrary#\4710bb8309419d707681bd360088181f\mycompany.mylibrary.myclass.ni.dll. zap: native image has been relocated. native image used.
so it's using native images still verifying them, i.e. not using gac version though that's created native image from, so:
ngen install "mycompany.entites, version=2.0.0.0, culture=neutral, publickeytoken=7cd8595f4671c5dd, processorarchitecture=msil"
footnote: articles seems imply if assemblies not loaded gac verification process offset ngen advantages? clr inside out - improving application startup performance (msdn)
update - nobugz has pointed out in comment below, verification step mentioned above not performed since 3.5 sp1 see:msdn docs on ngen
you can see fuslogvw.exe tool. start visual studio command prompt. configure log categories = native images, settings + log binds disk. run program. fuslogvw, refresh. show list of assemblies got loaded.
double-click entry see how assembly got loaded. if came gac, you'll see:
log: il assembly loaded c:\windows\assembly\gac_msil\blahblah
if ngen-ed images used, you'll see:
log: bind native image succeeded.
Comments
Post a Comment