1.1 to 1.0

  • Thread starter Thread starter Nak
  • Start date Start date
N

Nak

Hi there,

I was wondering if it was possible to reference a 1.1 Framework version
DLL in a 1.0 application if the 1.1 DLL is 1.0 compatible? Cheers in
advance.

Nick.
 
Ignore that one, SharpDevelop has a feature that VB.NET could do with,
compilation for other Framework versions, nice.

Nick.
 
* "Nak said:
I was wondering if it was possible to reference a 1.1 Framework version
DLL in a 1.0 application if the 1.1 DLL is 1.0 compatible? Cheers in
advance.

/Why?/ If the DLL is a .NET 1.1 assembly, .NET 1.1 should be installed
(it's not mandatory in some cases, but recommended), then the
application using the DLL can be a .NET 1.1 assembly too...
 
Herfried,
/Why?/ If the DLL is a .NET 1.1 assembly, .NET 1.1 should be installed
(it's not mandatory in some cases, but recommended), then the
application using the DLL can be a .NET 1.1 assembly too...

LOL!

Imagine this Herfried....

1) I posess VB.NET Standard 2002 (Which I have mentioned many a time,
and raised many discussions on)
2) I have a very small C# DLL that I havent converted to VB.NET as yet
3) The DLL is written using the new version of SharpDevelop which
compiles for version 1.1 of the Framework by default
4) The DLL and main executable are incompattable on a machine with both
Frameworks installed (As is the case on my machine) As each assembly uses
the Framework in which it was compiled for, this causes an exception to
occur unfortunately :-(

I have solved my problem now anyway as SharpDevelop allows for
compilation onto either Frameworks, which is very nice. Before I new this
feature existed I had to use the old version of SharpDevelop which was a bit
buggy and lacked loads of the current features, so I am happy that I can use
the new one now :-)

Nick.
 
* "Nak said:
LOL!

Imagine this Herfried....

1) I posess VB.NET Standard 2002 (Which I have mentioned many a time,
and raised many discussions on)

OK, that's a reason!
I have solved my problem now anyway as SharpDevelop allows for
compilation onto either Frameworks, which is very nice.

:-)
 
Herfried,


LOL!

Imagine this Herfried....

4) The DLL and main executable are incompattable on a machine with both
Frameworks installed (As is the case on my machine) As each assembly uses
the Framework in which it was compiled for, this causes an exception to
occur unfortunately :-(

Hmmm, did you try telling the dll compiled on 1.1 to use the 1.0
framework? I have a windows service that was developed on 1.1 running
on a box with the 1.0 framework. You should just have to setup an app.config
file - as long as the dll doesn't use any 1.1 specific classes or
methods.
 
Nick,
Yes!

You need to add an app.config to your .exe, in the app.config. you need to
add all the entries that will redirect your 1.1. assembly and all the
assemblies that it references to 1.0.

See the referenced articles at:
http://msdn.microsoft.com/library/d...pguide/html/cpconside-by-sideexecutiontop.asp

Note if the 1.1 assembly has a designer, I have not seen a reliable method
of using the designer in VS.NET 2002...

Hope this helps
Jay
 
Hi Jay,
Yes!

You need to add an app.config to your .exe, in the app.config. you need to
add all the entries that will redirect your 1.1. assembly and all the
assemblies that it references to 1.0.

See the referenced articles at:
http://msdn.microsoft.com/library/d...pguide/html/cpconside-by-sideexecutiontop.asp

Note if the 1.1 assembly has a designer, I have not seen a reliable method
of using the designer in VS.NET 2002...

Aaah, that is good to know, I wasn't aware of this one. Although I have
used a different solution for now, as making the entire solution suitable
for 1.0 of the framework only as the majority of my project is. Hopefully I
shall upgrade my IDE one day and I wont need to do this. But this is
definitely good information, so this would mean that I can downgrade any
assembly to 1.0 without recompiling? Handy if the assembly is not mine,
that is for sure!

Nick.
 
Hi Tom,
Hmmm, did you try telling the dll compiled on 1.1 to use the 1.0
framework? I have a windows service that was developed on 1.1 running
on a box with the 1.0 framework. You should just have to setup an app.config
file - as long as the dll doesn't use any 1.1 specific classes or
methods.

I've written a reply to Jay in response to your 2 answers, but it is
directed towards *you* also. Cheers for the information, this is quite
handy to know.

Nick.
 
Nick,
But this is
definitely good information, so this would mean that I can downgrade any
assembly to 1.0 without recompiling?
Yes, any assembly that does not require 1.1 specific objects or methods can
be run on 1.0 without recompiling, if there is a 1.1 specific object or
method, I would expect it not to load, or simply fail (exception) when it
gets to that statement. The following site lists changes from 1.0 to 1.1
along with the new 1.1 to 2.0 changes.

http://www.gotdotnet.com/team/changeinfo/default.aspx
Handy if the assembly is not mine,
Actually its also handy if the assembly is yours and it needs to be deployed
to a machine with 1.0 only. VS.NET 2003 has an option under the Project
Properties that will generate all the app.config file settings for you.

Hope this helps
Jay
 
Cheers again Jay!

:-)

Nick.

Jay B. Harlow said:
Nick,
Yes, any assembly that does not require 1.1 specific objects or methods can
be run on 1.0 without recompiling, if there is a 1.1 specific object or
method, I would expect it not to load, or simply fail (exception) when it
gets to that statement. The following site lists changes from 1.0 to 1.1
along with the new 1.1 to 2.0 changes.

http://www.gotdotnet.com/team/changeinfo/default.aspx

Actually its also handy if the assembly is yours and it needs to be deployed
to a machine with 1.0 only. VS.NET 2003 has an option under the Project
Properties that will generate all the app.config file settings for you.

Hope this helps
Jay

need
http://msdn.microsoft.com/library/d...pguide/html/cpconside-by-sideexecutiontop.asp Hopefully
 

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

Back
Top