Reputation: 9
Im new to Native Code Generation in .Net 4.0. In my project there are totally 500+ DLL file for a single EXE file. If I have to create a Native Image for all those DLL using ngen.exe install it is going to be a big process. So My question is whether there is any tool or script to create the Native Image for all those DLL files. Please help me with this problem.
Thanks in Advance.,
Upvotes: 0
Views: 332
Reputation: 117220
Just use the DOS 'FOR' command:
FOR %x IN (*.dll) DO ngen install %x
Upvotes: 2
Reputation: 5129
Just quoting the very first paragraph of the Examples section of the Ngen.exe documentation page in MSDN:
The following command generates a native image for ClientApp.exe, located in the current directory, and installs the image in the native image cache. If a configuration file exists for the assembly, Ngen.exe uses it. In addition, native images are generated for any .dll files that ClientApp.exe references.
ngen install ClientApp.exe
So maybe RTFM?
Upvotes: 1