473,398 Members | 2,343 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,398 software developers and data experts.

Referencing DLLs in different version.

Quick question.

Say I have a project against the 2.0framework. I also have a dll compiled
against 3.5. If I reference the 3.5 dll in the 2.0 project, how would that
work?

So I'm thinking that the 3.5 dll gets loaded in memory by the 3.5 framework
running in process X.

The 2.0 project dlls get loaded in the process running the 2.0 framework in
process Y.

So I would think that any calls will suffer out-of-process performance, but
at least it works. Am I correct on this? Would someone be able to help me
understand the situation here? Perhaps .net is doing something interesting
and the performance isn't really an issue between framework versions? Not
sure.

Thank you.
Jun 27 '08 #1
3 3646
All of .NET 2.0, .NET 3.0 and .NET 3.5 run on CLR v2 (give or take a
service pack). It is the CLR version that would force issues; .NET 3.0
and .NET 3.5 are simply some extra dlls that run in the same CLR.

So in short, there is no issue here. You are simply referencing some
additional dlls. Blame marketing ;-p

Marc
Jun 27 '08 #2
Thanks Marc for the reply.

I understand that the CLR version is the same for the three. However, it was
my understanding that the different frameworks needed to be loaded separately
(different processes) to accommodate for the different versions of the dlls
(there several dlls that were updated from the new versions).

Are you stating that all 2.0/3.0/3.5 frameworks all load under the same
process? Then how does it load different assembly versions? I suppose if it
loads different appdomains for each it should work, but I don't know at the
level of detail.

In any case, what you say doesn't quite make sense to me and I would love to
hear the explanation. From what I know, it should be that each 3.5 dlls will
be referencing their respective 3.5 dlls (if there are newer versions) and
they should all load in one process but maybe I'm missing something here.

I appreciate the time you took to respond! Thank you!

"Marc Gravell" wrote:
All of .NET 2.0, .NET 3.0 and .NET 3.5 run on CLR v2 (give or take a
service pack). It is the CLR version that would force issues; .NET 3.0
and .NET 3.5 are simply some extra dlls that run in the same CLR.

So in short, there is no issue here. You are simply referencing some
additional dlls. Blame marketing ;-p

Marc
Jun 27 '08 #3
Are you stating that all 2.0/3.0/3.5 frameworks all load under the same
process? Then how does it load different assembly versions?
I suppose if it loads different appdomains for each it should work [snip]
It doesn't. It comes down to "red bits", "green bits" and "blue
bits" ;-p [tongue in cheek...]

..NET 3.0 and 3.5 are *just* some extra assemblies. They managed to
get .NET 3.0 and 3.5 without introducing any extra IL instructions
[just lots of compiler tricks]. Which is why you can use C# 3 code
on .NET 2.0; once compiled, C# 3 code is just CLR2 IL.
The 3.5 installer /happens/ to install a service pack for 2.0 and 3.0,
but once that is done you *always* get that service pack - i.e. once
you've installed 3.5, even your "pure 2.0" code uses the 2.0 service
pack. So all you really have is an application that happens to
reference some things *called* 3.0 and 3.5 - but that is *just* their
name. Fundamentally they are CLR2, and that is what matters [give or
take a service-pack ;-p].
From what I know, it should be that each 3.5 dlls will
be referencing their respective 3.5 dlls
No; you're thinking CLR versions... if it was CLR 3.5, then yes, it
would be tricky. Again, key point: at the runtime level, there is
nothing special about .NET 3.0 or .3.5; this is *only* a marketing
term.

Marc
Jun 27 '08 #4

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

Similar topics

5
by: ack | last post by:
Hii all, I have a this internal use portal i am working on deployed on a server. My app uses some dlls that are instantiated from the asp pages using server.createobject Now I want to deploy...
1
by: loretta.stokes | last post by:
I manage our nightly builds for all of our products. Since we have added our .NET assemblies to our nightly build, it has been a learning process. I have come across a couple of situations that I...
1
by: al_qwertyuiop | last post by:
Hi, I was wondering what happens if an .net exe compiled with 1.1 uses one dll compiled with 2.0 and one dll compiled with 1.1. Supposing that the target machine has both 1.1 and 2.0. Does the...
10
by: Doug Crabtree | last post by:
I am kinda new to the whole distribution process. I several programs that I am writing that use common .NET DLLs. I want each program to use the same DLLs in a "COMMON" folder. How do I get...
12
by: Mike | last post by:
I found this question before I asked mine: ----<previous question>---- We are clearly going about this the wrong way so before we get too far I would like some advice. We have all common...
7
by: Oenone | last post by:
I'm sure there's an obvious way to do this, but I'm missing it so far. I have an ASP.NET application that relies on several DLLs to work. Currently in order to get my site working I have to put...
4
by: Christopher C. Bernholt | last post by:
We have a solution which contains 2 projects. The first project is a windows control and it references an assembly. The second project is a test windows application used to test the windows...
4
by: Oenone | last post by:
Another VB6 feature that I'm missing in VB.NET is with regard to referencing projects vs. referencing DLLs. In VB6 I can reference my support library, Support.dll, and call its functions. If...
9
by: yevvi | last post by:
Hi, We have a product with bunch of dlls which are now built with Visual Studio 2003. We want to switch the build to use VS2005. I have read that in VS2005 runtime libraries come as...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.