.NET version problem

triplemaya

Member
Joined
Aug 27, 2006
Messages
15
Programming Experience
Beginner
I am making a simple application in visual studio .net 2005 express. It runs fine on my computer. However, when I go to use it on another computer, it doesn't work. It demands .net version 2.0.50727. I have tried it on a computer with .net 2.0, but this is no good. The application itself only needs .net, any version 1.1, 2.0, whatever.

When it was compiled with an earlier verion of visual studio this was not a problem, it ran with any version of .net. I want to make this software available on the internet, and I don't want it to be tied to a specific version of .net, because that is going to upset and confuse potential users.

In the project properties under references visual studio lists 5 dependencies, each one of which specifically names V2.0.50727 in the path, so I assume that this is what is causing the problem. However, I can find no way to change this. Please could someone tell me how to make visual studio produce an exe which will work with any version of .net. Many thanks.
 
You really should do some research before you jump into using a development tool. If you've built your app with VS 2005 then it requires version 2.0 of the Framework, period.

VS.NET 2002 built apps that required version 1.0 of the Framework. These apps will run on newer versions but there is no guarantee that they will not crash if they use a feature that has changed.

VS.NET 2003 built apps that required version 1.1 of the Framework. These apps will NOT run on version 1.0 but will run on version 2.0, but again, there is no guarantee that they will not crash if they use a feature that has changed. You can change the project settings in VS.NET 2003 to make an app run on version 1.0 as well, but you must ensure that you have not used any features that were new in version 1.1.

VS 2005 builds apps that require version 2.0 of the Framework. These apps will NOT run on versions 1.0 or 1.1.

This will NOT confuse potential users because you will make sure that it does not, once you sort out your own confusion. You should build an installer for your app that either includes or will download on demand version 2.0 of the Framework, having told your users beforehand that your app requires it.

The only way that you can not tie your app to a particular version of the Framework is to compile it against version 1.0 and then test it yourself on every later version. If you compiled it in VS.NET 2003 with the default options then it was already excluding version 1.0. Note the design of ALL versions of the .NET framework is such that an app compiled against any version will NOT work with an older version but WILL work with a newer version, although while the vast majority of apps will work on newer versions without issue there is no guarantee so if you specifically want to support newer versions then it's up to you to test your app against them.
 
V2.0.50727 is the main problem

Thank you very much for all that information.

I was having trouble with .net version 2.0, but I think I must have been using dotnetfx downloaded when 2.0 was in beta, so it would have been a version prior to V2.0.50727.

There is one more piece of information which would be of great assistance.

I have found that since 09/11/2005 Microsoft have included .NET Framework Version 2.0 in updates for all OSes, so an app requiring 2.0 will work on any pc kept updated. However, I would like to deploy the software in a form which would be a straightforward install for as many people as possible. What I have no idea is how many users aren't using updates, but still have an earlier version of .net installed. In other words, if I deploy the app built for version 1.0 ( tested for all later versions ) is that going to be an easier install process for a significant number of users? I've googled about, but I can't find any figures for numbers of installations of versions of .net.
 
Thanks for that. However, while my app is 280kb, dotnetfx is 22.4 meg. So, while the app itself is a snap to download, the download of the app with .net bundled with it would be nuisance, and for people not on dial up, a real pain in the posterior. I really want this to be as effortless as possible. If pretty much everyone who has .net has 2.0, then it's a simple decision to offer the version that works with 2.0, and offer a download for those who haven't got it. However, if there is a large user population out there with earlier versions, very possibly struggling along with some older equipment and not quite up to speed with all this new technology, then I reckon it is worth catering for them.
 
Who's to say that those same people won't need version 2.0 of the Framework for the next app they want to use anyway? And who's to say that even if more people have an older version of the Framework installed that the bulk of your users will have any version installed at all? If this is an issue for you then you're using the wrong development platform.
 
Back
Top