What is the story with these files ending with ni?
If you have done much debugging with .NET 2.0, you have probably come across these files before. For example, instead of seeing mscorlib.dll in your process, you will see mscorlib_ni.dll. So what are these files?
.ni images are precompiled managed code files. You take an IL image and run it through a tool called ngen.exe, which produces the .ni image. They're generated on a client machine and kept in a cache to avoid having to JIT code on the fly.
.ni images do not have symbol files of their own. Instead, they have the debug record info copied from the original IL image and share the IL image's symbols. There won't be a PDB specifically for a .ni image, nor will there be much of interest in the PDB (unless it's a managed C++ image with both native and managed code).
For some additional information on Ngen code and how to debug it, take a look at Mike Stall's post. There was also a great article in the MSDN Magazine done by Reid Wilkes back in April of 2005 that you can read here.
Comments
Anonymous
May 19, 2008
You've been kicked (a good thing) - Trackback from DotNetKicks.comAnonymous
May 19, 2008
http://www.youtube.com/watch?v=2UbtcmjfKa8Anonymous
May 19, 2008
Thanks for sharing the interesting stuff.....Anonymous
May 20, 2008
May I ask why someone would need the ni files?Anonymous
May 20, 2008
Chirag, They allow you to not have to compile the files. They are already native to the machine. So it loads faster.Anonymous
May 20, 2008
thanks.but i wonder what ni stands for! ngen ???Anonymous
May 21, 2008
Mojtaba, ni stands for Native Image. Because the file is now compiled for that particular platform.