• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Dotnet backward compatible?

xoggoth

More fingers than teeth
Joined
Jul 8, 2005
Messages
17,129
Likes received
4,948
Thanks received
1,184
Location
xoggoth towers
According to an expert I asked on a forum one needs to instal the particular version of dotnetfx that one's program needs as this link appears to confirm:

http://www.watchingthenet.com/how-to-check-which-version-of-dotnet-is-installed-in-windows.html

It hardly seems credible to me that the framework would not be backward compatible, after all one does not have to instal dotnet on Vista/Win 7 which already contain the latest versions, so why would one need to instal a version on Win2000 or XP if a later version is already installed? Having a very specific version check is just making the install more complicated and possibly installing something the user does not need.

Any experiences on how all this works? Cheers.
 
Hi Xog.

The framework versions are:

1.0 (very old)
1.1
2.0 (lots of new stuff)
3.0 (this is the 2.0 version with new features such as WCF, WPF, etc).
3.5 (this is just the 3.0 version with some new API's and LINQ, ASP.NET Ajax etc ).

When you compile your application in VS.NET you target a particular version (e.g. 2.0 or 3.5).

When you create you deployment package (using VS.NET, or a 3rd party deployment package), it will check the version installed, and if it requires a newer version, run the installer for that version).

Another option is to use something like Xenocode. This makes life a lot easier!

http://www.xenocode.com/
http://www.xenocode.com/Technology/

No more missing DLL's, framework conflicts, security issues etc.

PS you need the Xenocode Virtual Application Studio ISV Edition

http://www.componentsource.com/prod...pplication-studio-isv-edition/prices-gbp.html
 
Last edited: 11:33
Cheers dim.

When you say it will check the version installed, do you mean you are assuming the program installation will do it, or that any dotnetfx installation launched by the program will do it?

Wil have a decko at that xenocode. Looks complicated on quick scan.
 
Here's a recent example I came across from Microsoft(!)

When you try to install it it says "This app requires .NET v1.1.4322" and refuses to work even if .NET V 2 or higher is installed.
 
Last edited: 05:18
Here's a recent example I came across from Microsoft(!)

When you try to install it it says "This app requires .NET v1.1.4322" and refuses to work even if .NET V 2 or higher is installed.

As I tried to explain, 1.0 and 1.1 and 2.0 are all distinct, non-backward compatible frameworks. 3.0 and 3.5 are based on the 2.0 CLR with added extras.

If you program is compiled against 1.1 and the target machine has 1.0, 2.0, 3.0 or 3.5 installed it won't work.

To be honest, there is no excuse for not bringing your software up to the latest version of the framework.
 
If you program is compiled against 1.1 and the target machine has 1.0, 2.0, 3.0 or 3.5 installed it won't work.

Are you sure?

From http://msdn.microsoft.com/en-us/library/47a587hk.aspx...

The degree of .NET Framework support for backward and forward compatibility is version-specific. The .NET Framework supports both backward and forward compatibility for applications created using version 1.1 only. It does not support forward compatibility in applications created using version 2.0. In the context of the .NET Framework, backward compatibility means that an application created using an early version of the .NET Framework will run on a later version. Conversely, forward compatibility means that an application created using a later version of the .NET Framework will run on an earlier version.

The .NET Framework provides a high degree of support for backward compatibility. For example, most applications created using version 1.0 will run on version 1.1 and applications using version 1.1 will run on version 2.0. The .NET Framework also supports forward compatibility for version 1.1 only. However, for forward compatibility you might need to modify an application so that the application runs as expected. Applications created with version 2.0 will not run on earlier versions of the .NET Framework. For both backward and forward compatibility, a change to the .NET Framework that helps improve security, correctness, or functionality might also raise compatibility issues.
 

Maybe I'm wrong about the 1.0 and 1.1 versions, but I've never managed to get any serious application built for 1.1 to work on a machine that only has 2.0 installed (too many breaking changes in 2.0).

All this is sorted out by any decent installer program (e.g. Wise or InstallShield), which will detect what frameworks are already installed and silently install the runtime for the one that your application is compiled against.
 
As I tried to explain, 1.0 and 1.1 and 2.0 are all distinct, non-backward compatible frameworks. 3.0 and 3.5 are based on the 2.0X CLR with added extras.

If you program is compiled against 1.1 and the target machine has 1.0, 2.0, 3.0 or 3.5 installed it won't work.

To be honest, there is no excuse for not bringing your software up to the latest version of the framework.

It's not MY software!
 
Must say I'm with DP. Install the right runtime. But there are some ways and means of resolving some of the issues in some cases (is that wooly enough?)

supportedRuntime in the configuration file
assemblyBinding can also be used in the configuration file

This thread might just prove useful, or at least a start to what you might want to look for:-

http://stackoverflow.com/questions/...ion-to-run-under-specific-net-runtime-version

But to reinforce what DP said you could be getting into a whole heap of trouble quickly. Certainly there are breaking changes (e.g. one of the old configuration methods was deprecated between 1.1 and 2.0. This now gives a warning should you be compiling code that uses it, but just throws an exception if it's called.)

You might be able to do something with machine polices to allow redirection.

Edit: Forgot this link:-

http://msdn.microsoft.com/en-us/library/9w519wzk.aspx
 
Last edited: 11:59
Ta for further comments although does not seem to be entire agreement. My progs are not as ancient as 1.1 fortunately, it's 2.something.

Not entirely sure what "compiled against" is about, it's compiled with whatever Visual Studio 2005 with all updates is using. Certainly no probs on Vista or win 7 related to .net version.

Maybe I will clear .net off a machine, instal dotnetfx 3 and see what happens when I try and instal the prog.

PS I see from ASB's link that the dotnet version for "bootstrapper" is in the vbproj xml but that sounds like a packager thing.
 
Last edited: 13:02

Advertisers

Back
Top