0

I'm a bit confused about assemblies of .Net Framework.

When I look at a framework dll referenced from my console application, it shows the .net framework path (C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2)

enter image description here

When I look at the modules window on debug that shows assemblies and paths where the assembly loaded from, it shows the GAC.

enter image description here

So my question is, if it loads the assembly from GAC, why it shows the referenced path from .Net framework path, What is the role of this path ? (C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2)

In the csproj file there is no path for .Net Framework assemblies. When I want to add a new assembly from framework,which path this assemblies retrieved from to show below window ?

enter image description here

enter image description here

Sorry if I could not find correct words to ask my question. I hope, it is clear :)

tofro
  • 5,640
  • 14
  • 31
rastbin
  • 95
  • 8
  • Not sure. One is Net Version 4.0 which is 32 bit while the other is Net 4.5 which is 64 bit. I think 4.0 and 4.5 get the libraries from different locations. – jdweng Jan 11 '17 at 22:23

1 Answers1

1

The reference assemblies are there to for you to reference and compile against. They only contain signatures, they are installed as part of the .NET Targeting Pack and SDK.

The framework assemblies are what are used at runtime, and have actual implementation. They are what is bound to at runtime and have backward compatibility, as they may be a newer version of the framework that what is targetted at build time.

There is an excellent video that was posted recently by Immo Landwerth here. I'd highly recommend watching it, as it explains everything clearly.

Stuart
  • 5,358
  • 19
  • 28
  • 1
    Excellent ! I decompiled the dll on referenced assemblies and it has empty methods. So why is it doing something like that ? Why does not shows the real dll on referenced path ? – rastbin Jan 11 '17 at 22:28
  • Glad I could help =) – Stuart Jan 11 '17 at 22:30