Using .Net 2.0 components in .Net 1.1?

E

Ethan Strauss

Hi,
I need to convert a big .Net 1.1 solution to .Net 2.0. There is a LOT of
code here and I do not want to do the conversion all in one go. I would like
to be able convert individual projects from the solution to 2.0 and then
reference them from the 1.1 solution, but when I try to add a 2.0 .dll into
a 1.1 project, I get an error
"A reference to ... could not be added. This is not a valid assembly
or COM component....."
I can reference this same component in other 2.0 projects, so I think it is
valid for 2.0, but not 1.1. Is there a way to convince .Net 1.1 to read a
..Net 2.0 dll?
Thanks!
Ethan


Ethan Strauss Ph.D.
Bioinformatics Scientist
Promega Corporation
2800 Woods Hollow Rd.
Madison, WI 53711
608-274-4330
800-356-9526
(e-mail address removed)
 
J

Jon Skeet [C# MVP]

Hi,
I need to convert a big .Net 1.1 solution to .Net 2.0. There is a LOT of
code here and I do not want to do the conversion all in one go. I would like
to be able convert individual projects from the solution to 2.0 and then
reference them from the 1.1 solution, but when I try to add a 2.0 .dll into
a 1.1 project, I get an error
"A reference to ... could not be added. This is not a valid assembly
or COM component....."
I can reference this same component in other 2.0 projects, so I think it is
valid for 2.0, but not 1.1. Is there a way to convince .Net 1.1 to read a
.Net 2.0 dll?

No - go the other way round instead; start off with the top-level
project, and make that refer to 1.1 DLLs. That will work fine.
Gradually work down the dependency tree.
 
T

Tom Porterfield

Ethan said:
Hi,
I need to convert a big .Net 1.1 solution to .Net 2.0. There is a LOT of
code here and I do not want to do the conversion all in one go. I would like
to be able convert individual projects from the solution to 2.0 and then
reference them from the 1.1 solution, but when I try to add a 2.0 .dll into
a 1.1 project, I get an error
"A reference to ... could not be added. This is not a valid assembly
or COM component....."
I can reference this same component in other 2.0 projects, so I think it is
valid for 2.0, but not 1.1. Is there a way to convince .Net 1.1 to read a
.Net 2.0 dll?

Not directly, no. You could set up a remoting scheme of some sort to go
from the 1.1 to 2.0 dll indirectly, but you cannot directly reference a
2.0 assembly from a 1.1 assembly. Nor you can load a 2.0 assembly under
the 1.1 framework.
 
A

Andy

Hi,
I need to convert a big .Net 1.1 solution to .Net 2.0. There is a LOT of
code here and I do not want to do the conversion all in one go. I would like
to be able convert individual projects from the solution to 2.0 and then
reference them from the 1.1 solution, but when I try to add a 2.0 .dll into
a 1.1 project, I get an error
"A reference to ... could not be added. This is not a valid assembly
or COM component....."
I can reference this same component in other 2.0 projects, so I think it is
valid for 2.0, but not 1.1. Is there a way to convince .Net 1.1 to read a
.Net 2.0 dll?

Try the other way. For example, convert your application project
first, and it can use assemblies from .Net 1.1 without recompiling.
There's no way to get 1.1 to use 2.0 assemblies.
 
E

Ethan Strauss

OK. Thanks to all. I was afraid I would have to do that. I could have
started with smaller chunks the other way 'round...
I'll start today!
Ethan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top