Results 1 to 9 of 9

Thread: Specify framework version for an app

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2000
    Location
    NY
    Posts
    497

    Specify framework version for an app

    I'm using Visual Studio 2005 and my simple application wants to use .NET Framework 2.0. I assume this because when I run it on another computer it tells me it needs it to run. I rather just force my app to use .NET 1.0 or 1.1.

    I've searched this forum and come up empty. I did find a post elsewhere explaining how application configuration files can help you achieve this but no details on how to do it.

    It seems there should be a way inside the sophisticated IDE environment to tell the compiler this. Any ideas?
    end war
    stop greed

  2. #2
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,521

    Re: Specify framework version for an app

    I believe I have read about some hacks that will do it, but you shouldn't do it. If you want your application to run on 1.1 get VS 2003 if you want your app to run on 1.0 get VS 2002. Each version of VS developes for a specifc framework.
    Visual Studio Team Edition 2005
    GDI+ Links: Bob Powell VB.Net Heaven
    API Links: All API Pinvoke.Net
    VB6 to VB.Net: Visual Basic 6 to .NET Function Equivalents (Thread)

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2000
    Location
    NY
    Posts
    497

    Re: Specify framework version for an app

    So pardon my ignorance, but there's no "backward compatibility" between frameworks? 2.0 won't run 1.0 apps? Yikes.
    end war
    stop greed

  4. #4
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,521

    Re: Specify framework version for an app

    Correct. The frameworks have no knowledge of each other. There really can't be backwards compatability.
    So for example an app was developed on 1.0 and the computer 2.0. In the app it uses a function provided by the framework that has since been removed from the framework. This would cause the app to not work.
    Visual Studio Team Edition 2005
    GDI+ Links: Bob Powell VB.Net Heaven
    API Links: All API Pinvoke.Net
    VB6 to VB.Net: Visual Basic 6 to .NET Function Equivalents (Thread)

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Specify framework version for an app

    The 2.0 framework has different classes, and many of the methods that you may inherently use are different. Backwards incompatibility is inevitable with evolution.

  6. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Specify framework version for an app

    It makes compete sense that .NET 2.0 apps can't use earlier Framework versions. Would you put a car engine in a plane and then expect it to take off? Do VB6 apps run with just the VB5 run-time files installed?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  7. #7
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,521

    Re: Specify framework version for an app

    Quote Originally Posted by jmcilhinney
    Would you put a car engine in a plane and then expect it to take off?
    I wouldn't mind doing the reverse.
    Visual Studio Team Edition 2005
    GDI+ Links: Bob Powell VB.Net Heaven
    API Links: All API Pinvoke.Net
    VB6 to VB.Net: Visual Basic 6 to .NET Function Equivalents (Thread)

  8. #8
    Addicted Member
    Join Date
    Aug 2002
    Posts
    224

    Re: Specify framework version for an app

    Hi,

    I have in my computer only Framework 2.0 and the application
    was build with Visual Studio 2003 in another computer.

    Can the application run in my computer?

  9. #9
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Specify framework version for an app

    .NET applications will usually run on a newer version of the Framework, but there is no guarantee. Run OK under most circumstances and then crash unexpectedly. They may appear to be working correctly but be corrupting your data behind the scenes. They will never run on an older version. You should definitely install the correct version of the Framework for the apps you're running. There is no issue whatsoever with running multiple Framework versions on the one system. It has been specifically designed to work that way.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

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



Click Here to Expand Forum to Full Width