473,322 Members | 1,480 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Not used reference assemblies

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
Nov 15 '05 #1
3 1460
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


Nov 15 '05 #2
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

Nov 15 '05 #3
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



Nov 15 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Vera | last post by:
I have two assemblies that each consist of several classes. Each object instantiated from those classes can have one or more child- and/or parentobjects that are also instantiated from those...
4
by: WM Chung | last post by:
Hi all, I meet a problem in building my .Net Solution and I would like to seek help. After I have added a dll to reference in one of my project in my solution, when I re-build the solution, I...
13
by: Brett | last post by:
If I believe certain project references (VS.NET) aren't being used, how can this be confirmed? Thanks, Brett
1
by: Adam Getchell | last post by:
I'd like to reference the SQLHelper.dll from the Microsoft Application Data Block. I've created an installer which installs it into the GAC. From reading articles, I've noted that the GAC...
11
by: Just Me | last post by:
I have a solution containing many usercontrol projects. When I wish to reference a usercontrol in another project I can select either the project or the assembly. Does it make a difference which...
11
by: Mark Olbert | last post by:
I'm running into some oddball behavior that I hope is not by design. When I add a reference (via Add Reference) to the bin folder, some, but not all, of the assemblies referenced by the assembly...
3
by: Richard Lewis Haggard | last post by:
We are having a lot of trouble with problems relating to failures relating to 'The located assembly's manifest definition with name 'xxx' does not match the assembly reference" but none of us here...
1
by: Vipul Pathak | last post by:
Hi Every one, I am working on deployment of a library. When the library installs on a user's machine, I want that the installed assemblies should get listed in the "Add Reference" (AddRef)...
5
by: Venkat | last post by:
Hi, My application is splitted into more than one assembly. And I want to clean up the methods which are not called or not used among any of the assemblies. And also I want to remove the code...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.