If you are brave enough to look at Whidbey's native image cache, you will see some odd directories ended with '#'.
C:\WINDOWS\assembly\NativeImages_v2.0.40607_32>dir *# Volume in drive C has no label. Volume Serial Number is 685B-4400
Directory of C:\WINDOWS\assembly\NativeImages_v2.0.40607_32
07/08/2004 01:59 AM <DIR> Microsoft.Build.Eng#07/08/2004 01:59 AM <DIR> Microsoft.Build.Fra#07/08/2004 01:59 AM <DIR> Microsoft.Build.Tas#07/08/2004 01:59 AM <DIR> Microsoft.Build.Uti#07/08/2004 02:08 AM <DIR> Microsoft.VisualBas#07/08/2004 02:59 AM <DIR> Microsoft.VisualStu#07/08/2004 02:00 AM <DIR> System.DirectorySer#07/08/2004 02:00 AM <DIR> System.Drawing.Desi#07/08/2004 01:59 AM <DIR> System.EnterpriseSe#07/08/2004 02:03 AM <DIR> System.Web.RegularE#
What is going on here?
Actually, we were using the assembly simple name as the directory name. But someone comes up really long assembly name. The native image file paths of those assemblies exceed MAX_PATH limit. As a result, those assemblies cannot be ngened.
We could ask them to shorten their assembly name. Of course, we don’t have much luck of doing that. So we limit the directory name to 20 characters, and set the last character to ‘#’ to indicate this is truncated assembly name.
The directory one level down uniquely identities the native image. So name collision is not a problem.