Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Why my application requires .NET 3.5 and .NET 4.0 Framework??

Why my application requires .NET 3.5 and .NET 4.0 Framework??

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharphelpasp-netquestionannouncement
14 Posts 5 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Roger Wright

    The .Net Framework 3.5 is installed with Windows 7, so for users who have already upgraded to Win7 you only have to add the .Net 4 package to your distribution. For the rest, you will definitely have to have them install both versions. As far as I can determine, the .Net 4 features are only distributed with VS 2010, and are add-ons to the .Net 3.5 set, not a complete, backward-compatible package. That surprises me a bit, as I'd expect each version to include all previous versions, but apparently that's not the case.

    Will Rogers never met me.

    P Offline
    P Offline
    Pete OHanlon
    wrote on last edited by
    #3

    Roger - the rewrite of .NET 4 meant that they distributed a completely new version because they put a lot of effort into making the runtimes smaller, reducing memory bloat. If you installed .NET 3.5, it was merely an extension to .NET 3 which, was an extension of .NET 2 - so they merely added new DLLs in those versions. I hope that this clears any confusion up.

    Forgive your enemies - it messes with their heads

    My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

    L R 2 Replies Last reply
    0
    • P Pete OHanlon

      Roger - the rewrite of .NET 4 meant that they distributed a completely new version because they put a lot of effort into making the runtimes smaller, reducing memory bloat. If you installed .NET 3.5, it was merely an extension to .NET 3 which, was an extension of .NET 2 - so they merely added new DLLs in those versions. I hope that this clears any confusion up.

      Forgive your enemies - it messes with their heads

      My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

      L Offline
      L Offline
      lydiae
      wrote on last edited by
      #4

      Pete, I am still a bit confused. Are you saying .NET 4 does not have all the dlls from the previous versions? Thanks in advance!

      P 2 Replies Last reply
      0
      • L lydiae

        Pete, I am still a bit confused. Are you saying .NET 4 does not have all the dlls from the previous versions? Thanks in advance!

        P Offline
        P Offline
        Pete OHanlon
        wrote on last edited by
        #5

        That's exactly what I'm saying. While it has all the functionality, some of that functionality was moved between DLLs. Remember that the DLLs also have security in them to prevent them being tampered with, so each new version of the DLL gets a new security ID.

        Forgive your enemies - it messes with their heads

        My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

        1 Reply Last reply
        0
        • P Pete OHanlon

          Roger - the rewrite of .NET 4 meant that they distributed a completely new version because they put a lot of effort into making the runtimes smaller, reducing memory bloat. If you installed .NET 3.5, it was merely an extension to .NET 3 which, was an extension of .NET 2 - so they merely added new DLLs in those versions. I hope that this clears any confusion up.

          Forgive your enemies - it messes with their heads

          My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

          R Offline
          R Offline
          Roger Wright
          wrote on last edited by
          #6

          I'm not criticizing the .Net 4 distro, but it still leaves Lydia hanging - she needs stuff in 3.5 that was left out of 4, apparently. As much as I dislike Microsoft's way of doing business, they have been really good about including all the dependencies in previous rewrites, and it seems that they didn't do so this time. Of course, I'm relying on adubious source[^] and could be entirely confused.

          Will Rogers never met me.

          P 1 Reply Last reply
          0
          • R Roger Wright

            I'm not criticizing the .Net 4 distro, but it still leaves Lydia hanging - she needs stuff in 3.5 that was left out of 4, apparently. As much as I dislike Microsoft's way of doing business, they have been really good about including all the dependencies in previous rewrites, and it seems that they didn't do so this time. Of course, I'm relying on adubious source[^] and could be entirely confused.

            Will Rogers never met me.

            P Offline
            P Offline
            Pete OHanlon
            wrote on last edited by
            #7

            Take a look at the criticism section which show that Microsoft were damned if they did and damned if they didn't: "Some developers have expressed concerns about the large size of the .NET Framework runtime installers for end-users. The size is around 54 MB for .NET 3.0, 197 MB for .NET 3.5, and 250 MB for .NET 3.5 SP1 (while using web installer the typical download for Windows XP is around 50 MB, for Windows Vista - 20 MB). The size issue is partially solved with .NET 4 installer (x86 + x64) being 54 MB and not embedding full runtime installation packages for previous versions." Basically, the issue they are addressing here is the user experience when somebody has to download code written for .NET 3.5 SP1 which resulted in a whopping 250MB download. What it sounds to me is Lydia has code that is still using a .NET 3.5 reference (in VS2010 you have the option just to choose .NET 4 references). The fix could be as simple as removing the reference to the old DLL and adding in the appropriate .NET 4 version. With .NET 4, it's not a good idea to mix with previous versions.

            Forgive your enemies - it messes with their heads

            My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

            R 1 Reply Last reply
            0
            • L lydiae

              Pete, I am still a bit confused. Are you saying .NET 4 does not have all the dlls from the previous versions? Thanks in advance!

              P Offline
              P Offline
              Pete OHanlon
              wrote on last edited by
              #8

              As I explain to Roger below, you may just need to change the reference from a .NET 3.5 DLL to a .NET 4 DLL to get it working OK.

              Forgive your enemies - it messes with their heads

              My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

              1 Reply Last reply
              0
              • P Pete OHanlon

                Take a look at the criticism section which show that Microsoft were damned if they did and damned if they didn't: "Some developers have expressed concerns about the large size of the .NET Framework runtime installers for end-users. The size is around 54 MB for .NET 3.0, 197 MB for .NET 3.5, and 250 MB for .NET 3.5 SP1 (while using web installer the typical download for Windows XP is around 50 MB, for Windows Vista - 20 MB). The size issue is partially solved with .NET 4 installer (x86 + x64) being 54 MB and not embedding full runtime installation packages for previous versions." Basically, the issue they are addressing here is the user experience when somebody has to download code written for .NET 3.5 SP1 which resulted in a whopping 250MB download. What it sounds to me is Lydia has code that is still using a .NET 3.5 reference (in VS2010 you have the option just to choose .NET 4 references). The fix could be as simple as removing the reference to the old DLL and adding in the appropriate .NET 4 version. With .NET 4, it's not a good idea to mix with previous versions.

                Forgive your enemies - it messes with their heads

                My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

                R Offline
                R Offline
                Roger Wright
                wrote on last edited by
                #9

                Pete O'Hanlon wrote:

                The fix could be as simple as removing the reference to the old DLL and adding in the appropriate .NET 4 version.

                Good point; removing functionality that is dependent on a previous version and replacing it with more current versions might remove a lot of challenges.

                Will Rogers never met me.

                L 1 Reply Last reply
                0
                • R Roger Wright

                  Pete O'Hanlon wrote:

                  The fix could be as simple as removing the reference to the old DLL and adding in the appropriate .NET 4 version.

                  Good point; removing functionality that is dependent on a previous version and replacing it with more current versions might remove a lot of challenges.

                  Will Rogers never met me.

                  L Offline
                  L Offline
                  lydiae
                  wrote on last edited by
                  #10

                  Thanks for your replies and useful tips Roger and Pete!

                  P R 2 Replies Last reply
                  0
                  • L lydiae

                    Thanks for your replies and useful tips Roger and Pete!

                    P Offline
                    P Offline
                    Pete OHanlon
                    wrote on last edited by
                    #11

                    You are welcome, and good luck.

                    Forgive your enemies - it messes with their heads

                    My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

                    1 Reply Last reply
                    0
                    • L lydiae

                      Thanks for your replies and useful tips Roger and Pete!

                      R Offline
                      R Offline
                      Roger Wright
                      wrote on last edited by
                      #12

                      You're quite welcome! :)

                      Will Rogers never met me.

                      1 Reply Last reply
                      0
                      • R Roger Wright

                        The .Net Framework 3.5 is installed with Windows 7, so for users who have already upgraded to Win7 you only have to add the .Net 4 package to your distribution. For the rest, you will definitely have to have them install both versions. As far as I can determine, the .Net 4 features are only distributed with VS 2010, and are add-ons to the .Net 3.5 set, not a complete, backward-compatible package. That surprises me a bit, as I'd expect each version to include all previous versions, but apparently that's not the case.

                        Will Rogers never met me.

                        J Offline
                        J Offline
                        Jason Christian
                        wrote on last edited by
                        #13

                        Actually, if you are compiling against .NET 3.5 so that your code works with 3.5 AND 4.0, then the issue is likely that you are using server-side components. .NET 4.0 is broken up into a Client Profile and Extended versions. .NET 4.0 by default only installs the Client Framework when installed on a client machine. Server-side (defined by Microsoft) components are not included (to keep the install size down). You can install them with the .NET 4.0 EXTENDED Framework, after which I would expect your service to work. If you set your compile target to .NET 4.0 Client Profile, you can discover which components are missing (because they are only in extended in 4.0), and possibly remove them if you want it to work with the 4.0 Client Profile.

                        1 Reply Last reply
                        0
                        • L lydiae

                          Hi All, I am new to .NET. I recently developed a windows service using VC#. During installation of this windows service I point to .NET 4.0(I am talking about the "installUtil". Not sure if this makes any difference.) Whenever there is .NET 3.5 and .NET 4.0 present in the system on which it runs my service runs perfectly fine. But whenever .NET 3.5 is not installed but only .NET 4.0 is present my service fails to run and it gives me the following error: Could not load file or assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. Does not .NET 4.0 contain everything that .NET 3.5 contains and more? Can anyone please help me with this situation? I definitely cannot ask everyone using my windows service to install .NET 3.5 and 4.0 on their systems. Can someone please provide a solution? Thanks in advance! Regards, Lydia

                          J Offline
                          J Offline
                          James Lonero
                          wrote on last edited by
                          #14

                          Since your application is compiled for both .NET 3.5 and 4.0, you will need both installed. If you want to run on a system that only has 4.0 installed, you will need to recompile all of your projects (of the service or application) using .NET 4.0. Look at all of the responses for more ideas.

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups