- Yes. At first time, when compilation occurs.
- Because those libraries will be loaded on demand, after they were compiled.
This should help How to pre-load all deployed assemblies for an AppDomain
Question
I have a Project Reference (to B.dll
) in Asp.Net MVC project, which is not used statically. At startup I'm looking through the loaded assemblies and dynamically register types from them in the IoC container.
When I rebuild MVC project and hit F5 I see B.dll
in the list of loaded assemblies returned by AppDomain.CurrentDomain.GetAssemblies()
.
Then I hit Stop and F5 again. This time there's no B.dll
in the loaded assemblies. However, if I call AppDomain.CurrentDomain.Load("B")
it'll be loaded correctly.
If I rebuild the project cycle repeats.
So the questions are:
bin
folder should be loaded by IIS at startup, am I right?Solution
This should help How to pre-load all deployed assemblies for an AppDomain