compiling in visual studio w/o .net?

Discussion in 'OT Technology' started by jdog12, Jul 17, 2007.

  1. jdog12

    jdog12 New Member

    Joined:
    Nov 27, 2004
    Messages:
    5,474
    Likes Received:
    0
    I am building a simple application that reads from a text file in current folder, rearranges text, and then copies rearranged text to the clipboard. I am using Visual c# 2005 express and have access to visual studio 2003. my question is, is there a way to compile this simple application so that the computer that runs it does not need the .net framework installed?
     
  2. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    Yes. Write it in Visual Studio 6 or Eclipse.

    Other than that, no.

    EDIT: For what it's worth, every machine running Windows XP, Windows Server 2003, or Windows 2000 sp4 is going to have the .NET Framework installed. They won't let you not install it.
     
  3. skinjob

    skinjob Active Member

    Joined:
    Jan 6, 2001
    Messages:
    2,337
    Likes Received:
    0
    Location:
    Aztlán
    Um... no

    C# and .NET go together like Java and its runtime environment. C# apps aren't compiled to native machine code until it's invoked with the support of the framework. So, it is required.

    There is a commercially available solution that uses virtualization to get around this type of dependency, but it's overkill for what you're trying to do.
     
  4. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    Um...yes. It would require rewriting the code in C++ or VB instead of C#, I'll give you that, but in VS6 you can compile directly to native code without any framework involved.
     
  5. SLED

    SLED build an idiot proof device and someone else will

    Joined:
    Sep 20, 2001
    Messages:
    28,118
    Likes Received:
    0
    Location:
    AZ, like a bauce!
    C/C++ and static linking in your dependencies are almost the only way to avoid having to install some kind of framework or libraries. Even VB6 has some runtime dll's that not all PC's have
     
  6. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    Yeah, but you don't always have to have those DLLs; that's the difference. Anything written in .NET is going to require .NET DLLs to be present, whether they're actually used or not. It's a stupid fucking system and the only reason Microsoft gets away with it is because so many people were thrilled to finally have a documented API that they didn't care about the extra weight the framework adds. I mean hell, at least Java is cross-platform compatible -- .NET only runs on Windows. It's an API for an API.
     
  7. skinjob

    skinjob Active Member

    Joined:
    Jan 6, 2001
    Messages:
    2,337
    Likes Received:
    0
    Location:
    Aztlán
    http://www.mono-project.com
     

Share This Page