Results 1 to 9 of 9

Thread: making a project work on all frameworks...

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2000
    Location
    I'm right here!
    Posts
    849

    Question making a project work on all frameworks...

    Hello,

    I have a project that I built in c# on the 2.0 framework.
    how can I know if the project will work on the 1.1 or 1.0 framework?

    is there a way to make it work on computers that have the other frameworks
    installed?

    thanks!!!

    Dekel C.

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

    Re: making a project work on all frameworks...

    Quote Originally Posted by dekelc
    I have a project that I built in c# on the 2.0 framework.
    how can I know if the project will work on the 1.1 or 1.0 framework?
    It won't work, guaranteed. Nothing compiled against version 2.0 will work without version 2.0 present on the machine it's being run on. The majority of applications compiled against version 1.0 will work with versions 1.1 and 2.0, and likewise the majority of applications compiled against version 1.1 will work on version 2.0. Microsoft provides a list of breaking changes in each version, so if none of the things listed applies to your app then it will work on later versions of the Framework. There is no reason for this to be an issue though because there is no reason that you can't have all three versions of the Framework installed on the one machine, guaranteeing that all apps will run.
    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

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2000
    Location
    I'm right here!
    Posts
    849

    Re: making a project work on all frameworks...

    so if I have all frameworks installed, can I develop a project in VS2005 and
    then compile it using framework version 1.0? so it will work on all machines?
    or do I need to install VS2003 for that?
    Dekel C.

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

    Re: making a project work on all frameworks...

    Every project developed in VS 2005 is compiled against version 2.0 of the Framework. They don't know or care about any previous version of the Framework. If version 2.0 is not present they will not work.

    Every project developed in VS.NET 2002 is compiled against version 1.0 of the Framework. If version 1.0 is present on the machine on which they run then they will use it. If it is not present and version 1.1 is then they will use it. If only version 2.0 is present then they will use it. The majority of projects developed in VS.NET 2002 will work on later versions of the Framework but some will not. Microsoft has a list of breaking changes available on MSDN.

    Projects developed on VS.NET 2003 target version 1.1 of the Framework by default, but you can change the project settings so that they target version 1.0 or both 1.0 and 1.1. Any project compiled against version 1.1 only will not work if only version 1.0 is present. Most projects compiled against version 1.1 will work if only version 2.0 is present but some will not. Microsoft has a list of breaking changes available on MSDN.

    How do I know all this? I read it on MSDN. Microsoft don't keep things like this a secret.
    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

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

    Re: making a project work on all frameworks...

    To sum up, the only way to make an app work on all three versuons of the Framework is to develop it in either VS.NET 2002 or VS.NET 2003 with the option to compile against version 1.0 set, then read the lists of breaking changes for versions 1.1 and 2.0 to make sure your code won't be affected by any of them, then test your app on a machine with just version 1.1 installed, then test your app on a machine with just version 2.0 installed, then hope like h*ll that you didn't miss anything importatnt in your testing.
    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

  6. #6
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,729

    Re: making a project work on all frameworks...

    @jmcilhinney,
    How they are doing this in SharpDevelop ? Isn't it completely written in C# ?
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


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

    Re: making a project work on all frameworks...

    SharpDevelop would have been written using the .NET Framework SDK 2.0, so to run SharpDevelop 2.0 you need the Framework 2.0. If it can create apps that target version 1.1 or version 2.0 then obviously it has a compiler for version 1.1 and 2.0, just like VS.NET 2003 has a compiler for version 1.0 and 1.1. You still needed version 1.1 to run VS.NET 2003 though. Microsoft have chosen to support only version 2.0 in VS 2005. Presumably you must choose which Framework version to support when you create a project in SharpDevelop because the version 2.0 languages have changed and so has the Framework. If you want to support version 1.1 then there are a great many things that are not available to you.
    Last edited by jmcilhinney; Feb 27th, 2006 at 01:41 AM.
    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

  8. #8
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    Re: making a project work on all frameworks...

    SharpDevelop2 is for .Net 2 where as SharpDevelop is for 1.0/1.1
    KrisSiegel.com - My Personal Website with my blog and portfolio
    Don't Forget to Rate Posts!

    Free Icons: FamFamFam, VBCorner, VBAccelerator
    Useful Links: System.Security.SecureString Managed DPAPI Overview Part 1 Managed DPAPI Overview Part 2 MSDN, MSDN2, Comparing the Timer Classes

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

    Re: making a project work on all frameworks...

    Quote Originally Posted by kasracer
    SharpDevelop2 is for .Net 2 where as SharpDevelop is for 1.0/1.1
    Not according to the download page. It says that SharpDevelop 2 was compiled against .NET 2.0 but can also be used to develop .NET 1.1 apps, while SharpDevelop 1.1 was compiled against .NET 1.1 and could create only .NET 1.1 apps.
    Attached Images Attached Images  
    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