You are absolutely right. If a type from an assembly is not used - it's not
even loaded and does not have to be present. Did a simple test.
The framework looks for the assembly file, when it's going to use a
type/code from the assembly. If it's not found (at runtime) then
FileNotFound exception is thrown.
--
Cezary Nolewajka
mailto:c.*********************@no-sp-am-eh-mail.com
remove all "no-sp-am-eh"s to reply
"Vadym Stetsyak" <pd****@ukr.net> wrote in message
news:OL**************@tk2msftngp13.phx.gbl...
So there is the possibility that Asm3 won't be at all and the application
won't crush
"Cezary Nolewajka" <c.*********************@no-sp-am-eh-mail.com> wrote in
message news:#m**************@TK2MSFTNGP11.phx.gbl... Even better than that.
Assemblies are loaded, when a type defined in an assembly is
instantiated or used. Then, the JIT compiler compiles the adaquate portion of the
assembly IL.
Cezary Nolewajka
mailto:c.*********************@no-sp-am-eh-mail.com
remove all "no-sp-am-eh"s to reply
"Vadym Stetsyak" <pd****@ukr.net> wrote in message
news:%2****************@tk2msftngp13.phx.gbl... Hi there
I am building an assembly Asm1, and it has references to Asm2 and
Asm3. (/reference: Asm2.dll Asm3.dll)
In Asm1 I am using types only from Asm2. The question is will CLR
loader load Asm3?
I assume that assemblies are loaded only when we reference to the type
that assembly contains
--
Vadym Stetsyak