Please explain .NET Framework relating to window application development-VBForums
Results 1 to 10 of 10

Thread: Please explain .NET Framework relating to window application development

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2017
    Posts
    75

    Question Please explain .NET Framework relating to window application development

    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

    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?

  2. #2
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    3,734

    Re: Please explain .NET Framework relating to window application development

    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.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Apr 2017
    Posts
    75

    Re: Please explain .NET Framework relating to window application development

    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?

  4. #4
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    3,734

    Re: Please explain .NET Framework relating to window application development

    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.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Apr 2017
    Posts
    75

    Re: Please explain .NET Framework relating to window application development

    Thanks passel. Best regards.

  6. #6
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    30,734

    Re: Please explain .NET Framework relating to window application development

    Quote Originally Posted by razz3333 View Post
    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?
    Quote Originally Posted by passel View Post
    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
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  7. #7
    Fanatic Member
    Join Date
    Dec 2014
    Location
    VB6 dinosaur land
    Posts
    699

    Re: Please explain .NET Framework relating to window application development

    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.

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Apr 2017
    Posts
    75

    Re: Please explain .NET Framework relating to window application development

    Quote Originally Posted by techgnome View Post
    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.
    Quote Originally Posted by topshot View Post
    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?

  9. #9
    Hyperactive Member PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Newport, UK
    Posts
    406

    Re: Please explain .NET Framework relating to window application development

    Quote Originally Posted by razz3333 View Post
    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.

    Quote Originally Posted by razz3333 View Post
    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.

    Quote Originally Posted by razz3333 View Post
    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.

    Quote Originally Posted by razz3333 View Post
    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/down...ils.aspx?id=21 and https://www.microsoft.com/en-gb/down....aspx?id=17718 respectively.

  10. #10

    Thread Starter
    Lively Member
    Join Date
    Apr 2017
    Posts
    75

    Re: Please explain .NET Framework relating to window application development

    Thank you PlausiblyDamp for your explanations. I truly appreciate your time and effort.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.