Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Please explain .NET Framework relating to window application development

razz3333

New member
Joined
Apr 16, 2017
Messages
75
I'm currently developing a windows application using VB.NET. I chose to develop it in .NET Framework 4.0

To be honest I am not sure what .NET Framework I should have chosen for developing my program. I am very new to all this developing stuff :eek:

Does this mean that my program can run on any Windows OS that have .NET Framework 4.0 or higher installed, or does it mean that 4.0 has to be specifically installed?

Any explanation will be greatly appreciated. Also, where is it best to download .NET Framework from?
 

passel

Sinecure devotee
Joined
Aug 15, 2013
Messages
5,882
Any 4.x framework should be compatible with a 4.0 target, i.e. if you wrote software with VS2010 targeting 4.0 it should run with whatever version 4.x.y of the framework that is out there. The VS2010 languages won't support the enhancements of the later (higher than 4.0) frameworks but the later frameworks will support the VS2010 (targeting 4.0) languages.
 

razz3333

New member
Joined
Apr 16, 2017
Messages
75
Thank you for your help passel.

I'm using VS 2017. So if I understand correctly, a user who installs my program and who is running Windows XP, would need to download 4.0 or higher Framework in order to run my program. If that's the case, would it have made sense to develop my program in 2.0 Framework so that it could run on most older Windows without additional Framework downloads?

This brings about another question. Using VS 2017, as mentioned previously I am developing my program with Framework 4.0. Can I change that to Framework 2.0 (in order to accommodate users with older Windows OS) and not have a problem with the coding?
 

passel

Sinecure devotee
Joined
Aug 15, 2013
Messages
5,882
We still use older versions of Visual Studio at work, so I'm not as familiar with 2015 or 2017 and targeting older frameworks and hopefully someone else will chime in. I know I do have 2017 loaded on some machine, but other than looking at it briefly, I haven't used it for any development.
 

techgnome

PowerPoster
Joined
May 15, 2002
Messages
32,778
Thank you for your help passel.

I'm using VS 2017. So if I understand correctly, a user who installs my program and who is running Windows XP, would need to download 4.0 or higher Framework in order to run my program. If that's the case, would it have made sense to develop my program in 2.0 Framework so that it could run on most older Windows without additional Framework downloads?

This brings about another question. Using VS 2017, as mentioned previously I am developing my program with Framework 4.0. Can I change that to Framework 2.0 (in order to accommodate users with older Windows OS) and not have a problem with the coding?

We still use older versions of Visual Studio at work, so I'm not as familiar with 2015 or 2017 and targeting older frameworks and hopefully someone else will chime in. I know I do have 2017 loaded on some machine, but other than looking at it briefly, I haven't used it for any development.

The answer is yes, sort of. You can target 2.0 from later Visual Studios... BUT you lose any Framework changes that have happened since then - LINQ, Lambdas, are just the ones I can remember off the top of my head. I think language updates (such as default property definitions) also are out as they sometimes rely on the FW. So, while you can target older FW's ... you just need to ask if you really want to... For a long time 2.0 was safe to target. Now, I think even 3.5 or 3.6 should be prevelant enough to be safe to target, and possibly even 4.0.

-tg
 

topshot

New member
Joined
Dec 17, 2014
Messages
1,191
I wouldn't bother supporting OS that is no longer supported so to be safe 3.5 would be the lowest FW I'd ever target now. That was installed by default on all Win 7 editions, which will eventually get updated to 4 via Windows Update if the user is running the default settings.
 

razz3333

New member
Joined
Apr 16, 2017
Messages
75
while you can target older FW's ... you just need to ask if you really want to... For a long time 2.0 was safe to target. Now, I think even 3.5 or 3.6 should be prevelant enough to be safe to target, and possibly even 4.0.

I wouldn't bother supporting OS that is no longer supported so to be safe 3.5 would be the lowest FW I'd ever target now. That was installed by default on all Win 7 editions, which will eventually get updated to 4 via Windows Update if the user is running the default settings.

Thank you both so much for your help. So according to what you say I could probably just keep it at 4.0 and not bother to change it to something like 3.5.

I have 4 questions:

1) From what I understand, "Close()" is newer code that replaced "Me.Close()" and I've used "Close()" throughout, not "Me.Close()". Would this code cause a problem if a user only has FW 3.5?

2) If I later decide to change it to 3.5, is that easy to do and will it cause a problem?

3) To make sure I have grasped this subject correctly, am I correct that a user who is running Windows XP would need to download FW 4.0 to run my program (or 3.5 if I change it to that)?

4) If I need to provide a link for users to download the required FW, where is it best to download .NET Framework from?
 

PlausiblyDamp

New member
Joined
Dec 8, 2016
Messages
1,190
1) From what I understand, "Close()" is newer code that replaced "Me.Close()" and I've used "Close()" throughout, not "Me.Close()". Would this code cause a problem if a user only has FW 3.5?
A form is simply a class and within a class Me simply refers to the class itself, all that means is Me.Close() and Close() are the same thing.

2) If I later decide to change it to 3.5, is that easy to do and will it cause a problem?
It depends if you have used any functionality that is in 4.0 but not in 3.5, if you think you may need to target 3.5 then make that the version you use, it is easier to move forward to 4.0 than it is to go from 4.0 to 3.5 if you have used functionality not present in the older version.

3) To make sure I have grasped this subject correctly, am I correct that a user who is running Windows XP would need to download FW 4.0 to run my program (or 3.5 if I change it to that)?
Possibly, there is a chance they may already have it installed either via Windows Update or because they have other software that requires it.

4) If I need to provide a link for users to download the required FW, where is it best to download .NET Framework from?
Either windows update or direct from the MS pages https://www.microsoft.com/en-gb/download/details.aspx?id=21 and https://www.microsoft.com/en-gb/download/details.aspx?id=17718 respectively.
 

razz3333

New member
Joined
Apr 16, 2017
Messages
75
Thank you PlausiblyDamp for your explanations. I truly appreciate your time and effort.
 
Top