- Use the right path separator char for unix. - Contruct some of the args to crossgen outside the loop. - Add the null check inside Command.Environment.
This will crossgen all the methods but the size of aseemblies increase.