0

While developing a vb.net desktop application, assuming that the code can work without changes on different frameworks, is it a good pratice to use the latest framework or is it better to choose an older framework?

Which kind of users may be advantaged by using the latest framework and Which kind of users may be advantaged by using an older framework?

(I see an advantage when a user doesn't need to download the framework to install and run the application)

Matt Wilko
  • 26,994
  • 10
  • 93
  • 143
genespos
  • 3,211
  • 6
  • 38
  • 70
  • 1
    I see no actual disadvantage of using the latest/a later version. Yes, some may have to download it, _but that should also_ be done when Windows Update is run, unless the user chooses to not install the framework update. I think it's the user's problem if he/she doesn't want to install the latest .NET Framework or if he/she doesn't run Windows Update that often. -- Although now that I come to think of it, using an older version (i.e. 3.5, 4.0) might have support for the people still using Windows XP. – Visual Vincent Jul 19 '16 at 09:09
  • 3
    I never once saw any point in trying to support a customer that does not want to keep his machines updated. They have to pay extra. Testing and keeping a machine around with their old version is not free. – Hans Passant Jul 19 '16 at 09:41
  • 1
    @HansPassant But what if you are developing a free application and you want it to have the higest diffusion? – genespos Jul 19 '16 at 09:44

1 Answers1

2

You are correct in stating that there is an advantage if the user doesn't have to install any other framework in order for your application to run. This speeds up deployment/installation.

The versions of the .net framework that are pre-installed on windows are covered on this page:

What version of the .NET framework is installed on Windows XP, Vista, and 7?

And also on the Wikipedia page:

.Net Framework release history

Another good reference is here:

What version of the .NET Framework is included in what version of the OS?

Note that if you plan to target users that have Windows XP then the highest version of the .net framework you can use is 4.0 as 4.5 dropped support for XP. If you don't care about XP i would personally suggest you just use the latest.

If you want the highest possible number of users to be able to use you app then the highest windows share is Windows 7 at 42% (reference: Usage Share of Operating systems) this has .Net 3.5 installed out of the box, so targetting that would be a good choice because you also don't cut off the 6.5% of Windows XP users (although they will have to install it)

Community
  • 1
  • 1
Matt Wilko
  • 26,994
  • 10
  • 93
  • 143
  • On your link I saw that 3.5 is on Win7 and 4.0 on Win8. Now, what if I use 3.5? Will it work on Win8 without any download? – genespos Jul 19 '16 at 09:48
  • That's an interesting question which I think is answered here: http://stackoverflow.com/questions/2642301/do-you-need-both-net-3-5-and-4-0-installed-or-just-net-4 – Matt Wilko Jul 19 '16 at 09:52
  • 1
    @genespos : I think it should. However I am unsure about the exact reason for it, I think it's either **A)** The newer frameworks are backwards compatible (they can run applications using older frameworks), or **B)** When .NET 4.0 is installed, all the previous versions are too. – Visual Vincent Jul 19 '16 at 09:55