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
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. .Net Framework vs .Net 5 Core

.Net Framework vs .Net 5 Core

Scheduled Pinned Locked Moved The Weird and The Wonderful
dotnetcsharpasp-netvisual-studioannouncement
31 Posts 15 Posters 0 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 Offline
    R Offline
    realJSOP
    wrote on last edited by
    #1

    So I wrote an app using .Net Framework (4.72), and published the article. There are fewer than 6 files to "publish" in the release folder. Out of curiosity, I re-implemented the code with .Net 5 Core. There are 22 files, six runtime folders, and a refs folder. All told the binary footprint is over 10mb LARGER than with .Net framework. I don't see the benefit of using .Net Core if it's going to consume that much more disk space.

    ".45 ACP - because shooting twice is just silly" - JSOP, 2010
    -----
    You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
    -----
    When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

    S R B Z M 7 Replies Last reply
    0
    • R realJSOP

      So I wrote an app using .Net Framework (4.72), and published the article. There are fewer than 6 files to "publish" in the release folder. Out of curiosity, I re-implemented the code with .Net 5 Core. There are 22 files, six runtime folders, and a refs folder. All told the binary footprint is over 10mb LARGER than with .Net framework. I don't see the benefit of using .Net Core if it's going to consume that much more disk space.

      ".45 ACP - because shooting twice is just silly" - JSOP, 2010
      -----
      You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
      -----
      When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

      S Offline
      S Offline
      Slacker007
      wrote on last edited by
      #2

      isn't the purpose of .net core to be able to run on any OS? I could be mistaken. If so, a larger footprint is understandable, I guess, as there are more files needed to run on non-Windows Operating systems.

      R R 2 Replies Last reply
      0
      • S Slacker007

        isn't the purpose of .net core to be able to run on any OS? I could be mistaken. If so, a larger footprint is understandable, I guess, as there are more files needed to run on non-Windows Operating systems.

        R Offline
        R Offline
        realJSOP
        wrote on last edited by
        #3

        Actually, no. You can't run .Net apps with UI's on Linux.

        ".45 ACP - because shooting twice is just silly" - JSOP, 2010
        -----
        You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
        -----
        When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

        S U 3 Replies Last reply
        0
        • S Slacker007

          isn't the purpose of .net core to be able to run on any OS? I could be mistaken. If so, a larger footprint is understandable, I guess, as there are more files needed to run on non-Windows Operating systems.

          R Offline
          R Offline
          r_hyde
          wrote on last edited by
          #4

          Bingo! But while cross-platform capability is nice, those of us who only need to target Windows have to take an unfortunate hit. And it only gets worse if you decide to publish as standalone, which balloons a basic "hello world" app to an astonishing 65MiB. Granted, this is not comparable to a .NET Framework build for obvious reasons, but it's still a bit ridiculous. Even a trimmed version is still 25MiB, and this is literally just to print "Hello World!" to the console. Not really complaining too much though, because I so enjoy using C# and .NET that this is a tradeoff I gladly make :)

          N 1 Reply Last reply
          0
          • R r_hyde

            Bingo! But while cross-platform capability is nice, those of us who only need to target Windows have to take an unfortunate hit. And it only gets worse if you decide to publish as standalone, which balloons a basic "hello world" app to an astonishing 65MiB. Granted, this is not comparable to a .NET Framework build for obvious reasons, but it's still a bit ridiculous. Even a trimmed version is still 25MiB, and this is literally just to print "Hello World!" to the console. Not really complaining too much though, because I so enjoy using C# and .NET that this is a tradeoff I gladly make :)

            N Offline
            N Offline
            Nelek
            wrote on last edited by
            #5

            Yeah, but this is a standalone application that will run (or at least should) in every windows without having .Net Core or .Net Framework installed, because the exe is containing all the needed information to run. Same 300 KB "hello world" need the 500+ Mb .Net Framework in the background to be executed. If you are going to have a lot of apps in stand alone... then it is not worthy. But there are constellations where it might be very usefull and I would not give a crap if the application is 10 times bigger, as long as it runs without having to install anything in the background and even more if it doesn't affect the performance

            M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.

            1 Reply Last reply
            0
            • R realJSOP

              Actually, no. You can't run .Net apps with UI's on Linux.

              ".45 ACP - because shooting twice is just silly" - JSOP, 2010
              -----
              You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
              -----
              When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

              S Offline
              S Offline
              Slacker007
              wrote on last edited by
              #6

              https://medium.com/datadriveninvestor/develop-cross-platform-net-core-desktop-apps-on-linux-with-xaml-bf3dbba9afa0[^] too be clear, I have not done this nor do I have experience with this, but I thought you could with xamerin or something like that.

              1 Reply Last reply
              0
              • R realJSOP

                Actually, no. You can't run .Net apps with UI's on Linux.

                ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                -----
                You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                -----
                When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

                S Offline
                S Offline
                Slacker007
                wrote on last edited by
                #7

                c# - Can you develop Linux applications with Xamarin? - Stack Overflow[^] Cross-platform with Xamarin | .NET[^]

                R 1 Reply Last reply
                0
                • R realJSOP

                  So I wrote an app using .Net Framework (4.72), and published the article. There are fewer than 6 files to "publish" in the release folder. Out of curiosity, I re-implemented the code with .Net 5 Core. There are 22 files, six runtime folders, and a refs folder. All told the binary footprint is over 10mb LARGER than with .Net framework. I don't see the benefit of using .Net Core if it's going to consume that much more disk space.

                  ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                  -----
                  You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                  -----
                  When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

                  R Offline
                  R Offline
                  Reelix
                  wrote on last edited by
                  #8

                  .NET Core is alarmingly finicky in how it's built as it defaults to a larger cross-platform "I don't need the .NET Framework" build instead of simply a native one as .NET Framework did. Try and run

                  dotnet publish -r win-x64 --self-contained false -o bin/

                  Then check your bin folder. Should be far smaller with far less files with the limitation that it only runs on Windows. For a small Linux-only build, you can use

                  dotnet publish -r linux-x64 --self-contained false -o bin/

                  Whilst this is smaller, you will now need the .NET 5 Framework (Not to be mistaken with the .NET Framework Framework) installed as you did with regular .NET Framework (One of the reasons your one is so much larger is that it bundles the entirety of the Framework in it as well as it assumes it's not natively installed)

                  -= Reelix =-

                  1 Reply Last reply
                  0
                  • S Slacker007

                    c# - Can you develop Linux applications with Xamarin? - Stack Overflow[^] Cross-platform with Xamarin | .NET[^]

                    R Offline
                    R Offline
                    realJSOP
                    wrote on last edited by
                    #9

                    Xamarin isn't desktop Linux.

                    ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                    -----
                    You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                    -----
                    When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

                    S 1 Reply Last reply
                    0
                    • R realJSOP

                      Xamarin isn't desktop Linux.

                      ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                      -----
                      You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                      -----
                      When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

                      S Offline
                      S Offline
                      Slacker007
                      wrote on last edited by
                      #10

                      Okay. I would not know. then don't use .net core if it gives you heartburn. we use it all the time at work and we don't care about the extra files and app size. it's a very trivial thing, really.

                      R 1 Reply Last reply
                      0
                      • S Slacker007

                        Okay. I would not know. then don't use .net core if it gives you heartburn. we use it all the time at work and we don't care about the extra files and app size. it's a very trivial thing, really.

                        R Offline
                        R Offline
                        realJSOP
                        wrote on last edited by
                        #11

                        Ya see, I'm old. When I started coding, using as little ram and disk space as possible was a real goal. I still believe that. I've always had heartburn regarding disk footprint with regards to .Net (and the fact that most of that footprint was hidden in the Win32 folder). With Core, it now needs to be deployed with your app. It's essentially the same as docker containers - you don't have to worry about what version of .net the user has because you're essentially putting the .net dependencies into the container. I have hundreds of projects on my hard drive. if I compiled them all for .net core, it would consume gigabytes more space than they do right now. For me, it's not a trivial thing. Really.

                        ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                        -----
                        You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                        -----
                        When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

                        K 1 Reply Last reply
                        0
                        • R realJSOP

                          Ya see, I'm old. When I started coding, using as little ram and disk space as possible was a real goal. I still believe that. I've always had heartburn regarding disk footprint with regards to .Net (and the fact that most of that footprint was hidden in the Win32 folder). With Core, it now needs to be deployed with your app. It's essentially the same as docker containers - you don't have to worry about what version of .net the user has because you're essentially putting the .net dependencies into the container. I have hundreds of projects on my hard drive. if I compiled them all for .net core, it would consume gigabytes more space than they do right now. For me, it's not a trivial thing. Really.

                          ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                          -----
                          You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                          -----
                          When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

                          K Offline
                          K Offline
                          Kirk Hawley
                          wrote on last edited by
                          #12

                          I've been a developer for 30 years and I have exactly the same heartburn. I have to keep telling myself "Disk space is cheap now, memory is cheap now". I have to ignore the little voice telling me, "This machine is MASSIVELY faster than the machine I was working on 30 years ago - why does everything start and run so freaking slow?"

                          Recursion is for programmers who haven't blown enough stacks yet.

                          K 1 Reply Last reply
                          0
                          • R realJSOP

                            So I wrote an app using .Net Framework (4.72), and published the article. There are fewer than 6 files to "publish" in the release folder. Out of curiosity, I re-implemented the code with .Net 5 Core. There are 22 files, six runtime folders, and a refs folder. All told the binary footprint is over 10mb LARGER than with .Net framework. I don't see the benefit of using .Net Core if it's going to consume that much more disk space.

                            ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                            -----
                            You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                            -----
                            When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

                            B Offline
                            B Offline
                            BDieser
                            wrote on last edited by
                            #13

                            Asking because I'm not sure, does Core have the ability to compile to a single exe, where framework does not? If that's the case, that would be one advantage.

                            N R 3 Replies Last reply
                            0
                            • B BDieser

                              Asking because I'm not sure, does Core have the ability to compile to a single exe, where framework does not? If that's the case, that would be one advantage.

                              N Offline
                              N Offline
                              Nelek
                              wrote on last edited by
                              #14

                              BDieser wrote:

                              Asking because I'm not sure, does Core have the ability to compile to a single exe, where framework does not?

                              yes, but the exe is much bigger. See my post above.

                              M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.

                              1 Reply Last reply
                              0
                              • B BDieser

                                Asking because I'm not sure, does Core have the ability to compile to a single exe, where framework does not? If that's the case, that would be one advantage.

                                R Offline
                                R Offline
                                realJSOP
                                wrote on last edited by
                                #15

                                i don't know.

                                ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                                -----
                                You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                                -----
                                When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

                                1 Reply Last reply
                                0
                                • R realJSOP

                                  So I wrote an app using .Net Framework (4.72), and published the article. There are fewer than 6 files to "publish" in the release folder. Out of curiosity, I re-implemented the code with .Net 5 Core. There are 22 files, six runtime folders, and a refs folder. All told the binary footprint is over 10mb LARGER than with .Net framework. I don't see the benefit of using .Net Core if it's going to consume that much more disk space.

                                  ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                                  -----
                                  You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                                  -----
                                  When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

                                  Z Offline
                                  Z Offline
                                  zezba9000
                                  wrote on last edited by
                                  #16

                                  The point is, its way faster, supports newer C# versions, newer framework features, runs on more platforms and supports standalone builds, etc. Also in .NET 6 you will be able to make AOT builds for all platforms. If 10mb is an issue on a Windows PC you're worrying about the wrong things. Also you can run IL trimmers in .NET 5. true Trimming options - .NET | Microsoft Docs[^]

                                  R 1 Reply Last reply
                                  0
                                  • K Kirk Hawley

                                    I've been a developer for 30 years and I have exactly the same heartburn. I have to keep telling myself "Disk space is cheap now, memory is cheap now". I have to ignore the little voice telling me, "This machine is MASSIVELY faster than the machine I was working on 30 years ago - why does everything start and run so freaking slow?"

                                    Recursion is for programmers who haven't blown enough stacks yet.

                                    K Offline
                                    K Offline
                                    kholsinger
                                    wrote on last edited by
                                    #17

                                    Yup.... it blows people's minds when I when I tell them one of our flagship products (of the early to mid 90s) had 0.000032GB of "disk space" (EEPROM) and even less RAM. And, by the way, it used a 0.012 GHz processor. And supported five serial ports. (But, of course, had no display, let alone a graphical one, no keyboard, no mouse....)

                                    1 Reply Last reply
                                    0
                                    • Z zezba9000

                                      The point is, its way faster, supports newer C# versions, newer framework features, runs on more platforms and supports standalone builds, etc. Also in .NET 6 you will be able to make AOT builds for all platforms. If 10mb is an issue on a Windows PC you're worrying about the wrong things. Also you can run IL trimmers in .NET 5. true Trimming options - .NET | Microsoft Docs[^]

                                      R Offline
                                      R Offline
                                      realJSOP
                                      wrote on last edited by
                                      #18

                                      zezba9000 wrote:

                                      supports newer C# versions

                                      Disingenuous claim - it *forces* you to use newer C# versions

                                      zezba9000 wrote:

                                      newer framework features,

                                      Disingenuous - it's still just .Net

                                      zezba9000 wrote:

                                      runs on more platforms

                                      Mostly false - it only runs on Windows if you add a UI. On linux, you have to run it through a glorified parser(the dotnet command). When you get right down to it, .Net isn't "native" on ANY platform.

                                      ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                                      -----
                                      You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                                      -----
                                      When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

                                      M Z 2 Replies Last reply
                                      0
                                      • B BDieser

                                        Asking because I'm not sure, does Core have the ability to compile to a single exe, where framework does not? If that's the case, that would be one advantage.

                                        R Offline
                                        R Offline
                                        realJSOP
                                        wrote on last edited by
                                        #19

                                        It compiles and runs fine, but when I try to publish as self-contained single file, I get this: Publish has encountered an error. We were unable to determine the cause of the error. Core is worthless. EDIT - when I set it to framework dependent single file, it "publishes" successfully, but I get still 5mb of deployable files.

                                        ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                                        -----
                                        You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                                        -----
                                        When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

                                        Greg UtasG 1 Reply Last reply
                                        0
                                        • R realJSOP

                                          It compiles and runs fine, but when I try to publish as self-contained single file, I get this: Publish has encountered an error. We were unable to determine the cause of the error. Core is worthless. EDIT - when I set it to framework dependent single file, it "publishes" successfully, but I get still 5mb of deployable files.

                                          ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                                          -----
                                          You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                                          -----
                                          When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

                                          Greg UtasG Offline
                                          Greg UtasG Offline
                                          Greg Utas
                                          wrote on last edited by
                                          #20

                                          #realJSOP quoted:

                                          Publish has encountered an error. We were unable to determine the cause of the error.

                                          I'm glad I didn't have a mouthful of coffee when I read this. Who releases such shite?

                                          Robust Services Core | Software Techniques for Lemmings | Articles
                                          The fox knows many things, but the hedgehog knows one big thing.

                                          <p><a href="https://github.com/GregUtas/robust-services-core/blob/master/README.md">Robust Services Core</a>
                                          <em>The fox knows many things, but the hedgehog knows one big thing.</em></p>

                                          N 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