How does .NET locate the dll of the namespace I’m using?
yeah, we do mention the path in /referene:c:\program files** but after building & deploying and when the software is installed on some user’s machine. It may not be at the same path as I (developer) mentioned it would be. I mean it could be some where else right?
- So, how does .NET find it?
- How does .NET know at the runtime what all namespaces are there in a dll?
- What if the user has the same dll but he renamed it? Does .net fails to load it then?
You can see the various probing steps in action if you run fuslogvw.exe (from the .NET SDK) and enable logging of all binds to disk. You will be able to see the various paths that .NET CLR uses to resolve assembly references. The rule of thumb though is to try the Global Assembly Cache first then check the local directory along with a bunch of other alternate paths.