General Question about .NET

M

Michael

The other day I was looking around in the GAC and I noticed
some strange things. For startings, I don't see any Microsoft
libraries that have a version number 1.1. I only see 1.0.5000
and 1.0.3300. I am thinking the 1.0.5000 is .NET v1.1 and
..NET v1.0 is 1.0.3300. So I went to
C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705 and
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322.
and looked at System.dll inside 1.1 and it says it's version
1.1.4322.573 and and looked at System.dll inside 1.0 and it says
it's version 1.0.3705.288. Now System.dll in the GAC I see
four times, twice with version number 1.0.5000.0 and twice with
1.0.3300.0. So my first question is, why are there two of each
version and the versions in GAC not marked with
1.0.3705.288(for version 1.0) and 1.1.4322.573 (for version 1.1)?

Another question I have is what is the purpose of the
C:\WINDOWS\Microsoft.NET\Framework\
directories? Why have the System.dll inside
the GAC and inside C:\WINDOWS\Microsoft.NET\Framework\
directories?

Anyway, thanks in advance for any responses.
Michael
 
M

Mattias Sjögren

Michael,
and looked at System.dll inside 1.1 and it says it's version
1.1.4322.573 and and looked at System.dll inside 1.0 and it says
it's version 1.0.3705.288.

Those are the file version numbers, that usually match the framework
version.

Now System.dll in the GAC I see
four times, twice with version number 1.0.5000.0 and twice with
1.0.3300.0.

That's are the assembly version number. As you see, it doesn't
necessarily match the file version.

So my first question is, why are there two of each version

One may actually be in the NGEN cache (if it says Native Images in the
Type column in Explorer), which isn't really the GAC.

Another question I have is what is the purpose of the
C:\WINDOWS\Microsoft.NET\Framework\
directories? Why have the System.dll inside
the GAC and inside C:\WINDOWS\Microsoft.NET\Framework\
directories?

That's where you point to to reference the assemblies. You can't
reference assemblies in the GAC directly.



Mattias
 
M

Michael

Mattias
Thanks for your reply. It makes better sense. How can you
see the true file version that you see in GAC when looking at the file
properties? I take it 1.0.5000.0 is AssemblyVersion and
1.1.4322.573 is AssemblyFileVersion. Why didn't
Microsoft stay consistent with these numbers?
Your right, it does say Native Images cache. This
morning there are two 1.0.5000.0 System.dll in GAC
that have Native Images in the type column and one that does
not have it. Guess it needed to cache them? Does that
get cached when a .NET program is using it and it keeps
it in the cach for x amount of time?

So C:\WINDOWS\Microsoft.NET\Framework\
directory is only used when developing and it's
never used when a program is running? The
reason i'm asking is because this gets installed with
Redistributable installer too. Seems like
a waste of memory if it's only used during
developing.

Once again thanks for your reply.
Michael
 
M

Mattias Sjögren

Michael,
How can you
see the true file version that you see in GAC when looking at the file
properties?

You can see the assembly version with a tool such as Ildasm.exe.

I take it 1.0.5000.0 is AssemblyVersion and
1.1.4322.573 is AssemblyFileVersion. Why didn't
Microsoft stay consistent with these numbers?

Here's some discussion on why you may want to differentiate them.

http://blogs.msdn.com/suzcook/archive/2003/05/29/57148.aspx

This
morning there are two 1.0.5000.0 System.dll in GAC
that have Native Images in the type column and one that does
not have it. Guess it needed to cache them?

There's a slight difference between them. Run Ngen.exe /show to see
the details.



Mattias
 

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