all groups > dotnet general > december 2007 >
You're in the

dotnet general

group:

Dot net 1.1 in Dot net 2.0


Dot net 1.1 in Dot net 2.0 Nishanth
12/28/2007 3:16:53 AM
dotnet general:
I have a code that is compiled and runs in VS 2003, which i believe
runs 1.1 frameworks,

I want to know if we can do any of the following

1. I want to compile the code in 1.1 framework but run on 2.0
framework in the same machine, as I believe it is not possible to
configure VS 2003 to run and compile the code on 2.0 framework.

2. if the above the scenario is not possible will I be able to run the
Re: Dot net 1.1 in Dot net 2.0 Jon Skeet [C# MVP]
12/28/2007 12:16:05 PM
[quoted text, click to view]

Yes you can. Just specify the <supportedRuntime> element in the
app.config file.

See http://msdn2.microsoft.com/en-us/library/w4atty68.aspx

I regularly build using VS2003 (because the app has to be *able* to run
on a machine with just 1.1) but then when the app is launched it uses
2.0 if it's available.

(The downside is that VS2003 won't let you debug into the code when
it's running in 2.0.)

[quoted text, click to view]

Well, sort of. When you install 3.5, that installs 2.0SP1 which has
*some* breaking behaviour.

--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
Re: Dot net 1.1 in Dot net 2.0 Cor Ligthert[MVP]
12/28/2007 1:05:41 PM
Nishanth,

[quoted text, click to view]

No you cannot,
[quoted text, click to view]

It should be possible however not recomended, some classes have different
behaviour (they learned from this, 2.0 to 3.5 is full upwards compatible).

Why not just download an express version of your solution and build it new?
The change that there will be much important warnings will be low.

Cor

Re: Dot net 1.1 in Dot net 2.0 Cor Ligthert[MVP]
12/28/2007 1:49:07 PM
Jon,

Are you sure, (the link you gave was directing to version 2008)

This one is for 2003

http://msdn2.microsoft.com/en-us/library/w4atty68(VS.71).aspx

It shows at least only 1.0 and 1.1 versions.

(I have always read that it was impossible and because of the fact that I
have always Net 1.1 installed with assemblys from that type never seen if it
would give problems, however just believed what was written)

Cor
Re: Dot net 1.1 in Dot net 2.0 Jon Skeet [C# MVP]
12/28/2007 2:34:30 PM
[quoted text, click to view]

Yes, I'm absolutely positive.

[quoted text, click to view]

Right - that shows that the element was supported even then, just with
an example for v1.0 and v1.1. The same element can be used with other
version numbers though - it just looks for that version of the
framework.

[quoted text, click to view]

Indeed - at the time that was written, how would MS have known what
version would come next (including minor version number)?

[quoted text, click to view]

I'm afraid I don't quite understand that sentence, but I assure you
that it works. Just try it.

--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
Re: Dot net 1.1 in Dot net 2.0 Cor Ligthert[MVP]
12/28/2007 5:11:16 PM
Jon,

Thanks for the information,

AddThis Social Bookmark Button