Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8978903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:43:04+00:00 2026-06-15T19:43:04+00:00

I am curious how .net resolves types. I know there is a compile-time component

  • 0

I am curious how .net resolves types. I know there is a compile-time component because you can’t compile a program that has using statements or fully qualified types which aren’t in the current assembly or a referenced assembly. I wonder if it’s the compiler that throughs an error or if it’s visual studio that throws a build error if it can’t find a reference in the proj file?

I am also wondering how .net finds the assembly at runtime. I know .net uses a JIT compiler that loads assemblies the first time it runs into a type from that assembly. I am curious about how it goes about looking for the type and the search order. Does the assembly manifest tell the runtime exactly where to look for referenced assemblies (like the ASP.NET web.config file)? Any links to blog posts, books, specs, etc would be much appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T19:43:05+00:00Added an answer on June 15, 2026 at 7:43 pm

    The ultimate source of error messages you get when you use an identifier that isn’t recognized is the compiler. You’ll get an early warning from IntelliSense, it puts the red squiggles under the identifier name.

    The compiler records the assembly, namespace and type name in the metadata of the assembly it generates from your source code. For the assembly, it records the display name (like System), the [AssemblyVersion] it found in the reference assembly and the PublicKeyToken, a value that’s relevant for strong-named assemblies.

    At runtime, it is the job of the CLR to find the assembly back with just those three assembly properties. The jitter will be the one that asks the CLR to find it when it needs to generate code. There are several obscure details about it, associated with overriding the normal lookup rules, you can find them documented in any good book about .NET or MSDN. This MSDN article goes into the details.

    The normal way is that it first looks in the GAC, a depository for assemblies and the place where all .NET framework assemblies are stored. The GAC is special since it can store multiple assemblies with the same name but different versions, a strong DLL Hell counter-measure. If it doesn’t find it there, using an exact match with those three properties plus the architecture, it then looks in the directory where the EXE is stored, accepting a match if the display name matches. All is well if all assembly properties match and the type can be found back with the same namespace and type name.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am really curious to know how the Expando Object in .Net 4.0 has
Curious what recommendations anyone has. I have an existing asp.net forms application that does
I'm basically curious if any Microsoft code (.NET Framework) has any files that show
I'm curious: has anyone used D together with .NET languages? Is that even possible?
I was curious if there's a .Net API that would allow me to identify
I'm curious about the possibility of having a .NET class library that provides a
I'm just curious to know about this.When i heard about Spring.net and tried some
How can dynamic breadcrumbs be achieved with ASP.net MVC? If you are curious about
Curious if anybody has considered using EnumMap in place of Java beans, particularly value
Curious if anyone has opinions on which method would be better suited for asp.net

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.