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. General Programming
  3. C#
  4. Create an EXE that runs without .NET Framework

Create an EXE that runs without .NET Framework

Scheduled Pinned Locked Moved C#
10 Posts 6 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.
  • M Offline
    M Offline
    Mogaambo
    wrote on last edited by
    #1

    I'm just curious, is there a way to build an executable that will run on a computer that doesn't have the .NET framework installed? i know that we can package our exe with dotnet framework which will install framework before installation. but is their any solution without installing . something like when we create exe thru vc++ compiler.

    “You will never be a leader unless you first learn to follow and be led.” –Tiorio "Coming together is a beginning, staying together is progress, and working together is success." Henry Ford

    L D D C 5 Replies Last reply
    0
    • M Mogaambo

      I'm just curious, is there a way to build an executable that will run on a computer that doesn't have the .NET framework installed? i know that we can package our exe with dotnet framework which will install framework before installation. but is their any solution without installing . something like when we create exe thru vc++ compiler.

      “You will never be a leader unless you first learn to follow and be led.” –Tiorio "Coming together is a beginning, staying together is progress, and working together is success." Henry Ford

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Easy, don't use a .NET language. There are some cheats to package the entire framework with the program and then Not install it but do some other magic, but IMO that's even worse then telling users to download/install the .NET framework (would they like a 100MB+ program that needs only be 1 - 5MB? I don't think so) Or maybe Mono's "full static compilation" will work also? I don't know. Maybe cr88192's project will do this..? Not too much is known about it..

      1 Reply Last reply
      0
      • M Mogaambo

        I'm just curious, is there a way to build an executable that will run on a computer that doesn't have the .NET framework installed? i know that we can package our exe with dotnet framework which will install framework before installation. but is their any solution without installing . something like when we create exe thru vc++ compiler.

        “You will never be a leader unless you first learn to follow and be led.” –Tiorio "Coming together is a beginning, staying together is progress, and working together is success." Henry Ford

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        There are products out there that will do something like this, but they all cost big money. There are no free ones that do this.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007, 2008

        1 Reply Last reply
        0
        • M Mogaambo

          I'm just curious, is there a way to build an executable that will run on a computer that doesn't have the .NET framework installed? i know that we can package our exe with dotnet framework which will install framework before installation. but is their any solution without installing . something like when we create exe thru vc++ compiler.

          “You will never be a leader unless you first learn to follow and be led.” –Tiorio "Coming together is a beginning, staying together is progress, and working together is success." Henry Ford

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          As Dave said, products do exist but they are expensive, google for xenocode postbuild and you will have one such example.

          Check out the CodeProject forum Guidelines[^]

          1 Reply Last reply
          0
          • M Mogaambo

            I'm just curious, is there a way to build an executable that will run on a computer that doesn't have the .NET framework installed? i know that we can package our exe with dotnet framework which will install framework before installation. but is their any solution without installing . something like when we create exe thru vc++ compiler.

            “You will never be a leader unless you first learn to follow and be led.” –Tiorio "Coming together is a beginning, staying together is progress, and working together is success." Henry Ford

            D Offline
            D Offline
            Dan Neely
            wrote on last edited by
            #5

            Xenocode[^] will create an executable that doesn't need the framework to run. Your apps still delivered in MSIL and running .net code though, the needed parts of the framework and CSC.exe are embedded with your original app into the file you deliver. This results in a large 20-30mb executable even for small apps. The RemoteSoft[^] linker and mini-deployment tool will convert your app into native code, so that there's no MSIL in your delivered files. The current version doesn't embed any of the native dlls from the framework that you use into the executable, so you have a series of folders with 20-30megs of them (possibly more). If you use XML serialization the automatically created IO classes will still be generated as managed code. I've played with this (and may be getting a copy for work); my big concern at the moment is that the author has been very poor about responding to email queries. If everything works more or less out of the box (it appears to at present) it shouldn't be an issue, but I'm worried about what if any major problems turn up. VMware offers a similar product but it's ~$5k vs ~1k for the other two and AFAIK functions at the same level as xenocode.

            Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall

            1 Reply Last reply
            0
            • M Mogaambo

              I'm just curious, is there a way to build an executable that will run on a computer that doesn't have the .NET framework installed? i know that we can package our exe with dotnet framework which will install framework before installation. but is their any solution without installing . something like when we create exe thru vc++ compiler.

              “You will never be a leader unless you first learn to follow and be led.” –Tiorio "Coming together is a beginning, staying together is progress, and working together is success." Henry Ford

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #6

              I am astounded that people ask this still. Yes, there's a /NOFRAMEWORK switch on the compiler, we just don't use it b/c we like to make people download the framework.

              Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

              D M H 4 Replies Last reply
              0
              • C Christian Graus

                I am astounded that people ask this still. Yes, there's a /NOFRAMEWORK switch on the compiler, we just don't use it b/c we like to make people download the framework.

                Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

                D Offline
                D Offline
                Dan Neely
                wrote on last edited by
                #7

                :rolleyes: In my case DLing the framework has had nothing to do with it. We made a app for X several years ago. X wants us to make a version of it for Y, but is freaking over the reverse engineering risks. This is a CheaperThanAC++Port option for us. (NTM my experiance with MFC and C++ more generally is limited to messing around as a student years ago so there'd be a major learning curve involved).

                Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall

                1 Reply Last reply
                0
                • C Christian Graus

                  I am astounded that people ask this still. Yes, there's a /NOFRAMEWORK switch on the compiler, we just don't use it b/c we like to make people download the framework.

                  Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

                  M Offline
                  M Offline
                  Mogaambo
                  wrote on last edited by
                  #8

                  So , if i compile with /NOFRAMEWORK in my machine and run that exe in another machine that doesn't have framework, will that exe run.

                  “You will never be a leader unless you first learn to follow and be led.” –Tiorio "Coming together is a beginning, staying together is progress, and working together is success." Henry Ford

                  1 Reply Last reply
                  0
                  • C Christian Graus

                    I am astounded that people ask this still. Yes, there's a /NOFRAMEWORK switch on the compiler, we just don't use it b/c we like to make people download the framework.

                    Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

                    H Offline
                    H Offline
                    Henry Minute
                    wrote on last edited by
                    #9

                    Congratulations! Your response has reached position 26 in a Google search for NOFRAMEWORK. A sterling effort.

                    Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

                    1 Reply Last reply
                    0
                    • C Christian Graus

                      I am astounded that people ask this still. Yes, there's a /NOFRAMEWORK switch on the compiler, we just don't use it b/c we like to make people download the framework.

                      Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

                      M Offline
                      M Offline
                      Mogaambo
                      wrote on last edited by
                      #10

                      This /NOFRAMEWORK option is not available in csc.exe, i don't know y u have given me this suggestion.

                      “You will never be a leader unless you first learn to follow and be led.” –Tiorio "Coming together is a beginning, staying together is progress, and working together is success." Henry Ford

                      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