NGEN native generation creating differing binaries on 2 different machines?

W

Will

Hi All,

* I have 2 dev machines, one is running WinXP Pro and one is running
Win2K Server. Each has Visual Studio .NET 7.0 installed (the .NET 1.0
dev tools.)
* I have a .NET .dll (let's call it a.dll) which I can run NGEN on,
giving me the native image, (let's call it a_native.dll.)
* Using the same version of NGEN and the same a.dll, I create
a_native.dll on both of these dev boxes.
* I do a binary diff on the 2 a_native.dll files and notice that
they are exactly the same size, but there are numerous differences
within the files.

Does anyone have an explanation for why this is happening? I don't
think it's an O/S issue because I think I ran this test on two XP
boxes as well, and got the same curious result.

Thanks in advance,
Will Smith
 
R

rollasoc

Read the documentation on Ngen again in the MSDN.

When you use Ngen.exe to create a native image of an assembly, the output
depends upon the command line options that you specify and certain settings
on your computer. These settings include the following:
a.. The version of the .NET Framework.
b.. The CPU type.
c.. The version of the operating system.
d.. The exact identity of the assembly (recompilation changes identity).
e.. The exact identity of all assemblies that the assembly references
(recompilation changes identity).
f.. Security factors.
You are using different operating system thus you will get different images.
(you didn't mention the CPUs which might explain the differences on the two
XP machines)

Hope that helps

Rollasoc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top