CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 14 of 14
  1. #1
    Join Date
    Feb 2011
    Posts
    5

    Who can help me?

    Hi everyone,
    Now I have a program by C#. I already build it go to .exe file. Now I want to run it on local machine without .net framework so how do I make it? If you have good solution please tell me thanks!

  2. #2
    Join Date
    Jul 2007
    Location
    Illinois
    Posts
    517

    Re: Who can help me?

    You kinda need to .NET Framework to run it. That's like trying to run a Java application without a JRE. There's always IL merge, but I believe it would still require the .NET Framework to run. If you didn't want to use the .NET Framework you could have programmed it in Win32/C++
    R.I.P. 3.5" Floppy Drives
    "I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones." - Albert Einstein

  3. #3
    Join Date
    Feb 2011
    Location
    United States
    Posts
    1,016

    Re: Who can help me?

    Aye, the .NET framework is currently required to run a C# application. You would need to find a native compiler to run it without the framework and they do not appear to exist. If you are using Windows, you can get the latest .NET framework from here: http://www.microsoft.com/downloads/e...displaylang=en

    If you are running in a linux environment, you can try using Mono: http://www.mono-project.com/Main_Page (this also runs under Windows of course, but - though they claim the contrary - there is usually not a good case for using it in preference to the Microsoft version unless you have a very specific need)

    You'll need to install one of those to run your code.

    Good luck! Let us know if you need further assistance.
    Best Regards,

    BioPhysEngr
    http://blog.biophysengr.net
    --
    All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

  4. #4
    Join Date
    Feb 2011
    Posts
    5

    Thanks!

    Ok, I already understand your idea and I already know about that. But this is my boss request so i don't have more choice. I already explain all for him but he want me to find solution for to do that. If there is no way to do that so we can have another way. My project makes by C# is good solution for my job. Now my project need to add just small that request. If everyone have another solution please tell me! Thanks. I'm thinking to portable now. If everyone have more idea about that plz tell me.

  5. #5
    Join Date
    Jan 2002
    Location
    Scaro, UK
    Posts
    5,940

    Re: Who can help me?

    There is no way of running a .NET application on a machine which doesn't have the .NET framework installed.

    I've afraid what you're asking is kind of like "I want to run a Windows application on a machine which doesn't have Windows installed".

    You could potentially switch to native C++, however these days you have to have the correct C++ runtime installed on the destination machine so you'll always have to install something.

    Why not produce an msi (google for deployment projects) which will install the correct .NET framework as part of its install.

    Darwen.
    www.pinvoker.com - PInvoker - the .NET PInvoke Interface Exporter for C++ Dlls.

  6. #6
    Join Date
    Jun 2008
    Posts
    2,477

    Re: Thanks!

    Quote Originally Posted by longvan_dmit View Post
    Ok, I already understand your idea and I already know about that. But this is my boss request so i don't have more choice.
    That doesn't mean it makes sense. I'm curious to hear why your boss would request this at all. You don't have to package the .NET runtime with the installer; any up to PC will have the current version of .NET anyway. You can simply add logic to your installer that downloads the update if needed.
    Last edited by BigEd781; February 17th, 2011 at 01:26 PM.

  7. #7
    Join Date
    Feb 2011
    Posts
    5

    Thanks everyone.

    I thank everyone told me about my problem. I will try to find another way to solve my problem. Thanks everyone shared your idea to me.
    Have a nice day to you.

  8. #8
    Join Date
    Mar 2004
    Location
    33°11'18.10"N 96°45'20.28"W
    Posts
    1,808

    Re: Who can help me?

    I have a problem too...

    I have a computer program that I want to run without a computer.

    if you have to solution, please to share it for please.

  9. #9
    Join Date
    Feb 2011
    Location
    United States
    Posts
    1,016

    Re: Who can help me?

    Quote Originally Posted by MadHatter View Post
    I have a computer program that I want to run without a computer.
    All you need is rocks and some time: http://xkcd.com/505/

    I didn't see you specify any restrictions on the computational speed. :-)
    Best Regards,

    BioPhysEngr
    http://blog.biophysengr.net
    --
    All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

  10. #10
    Join Date
    Mar 2004
    Location
    33°11'18.10"N 96°45'20.28"W
    Posts
    1,808

    Re: Who can help me?

    lol, loved that one! xkcd rocks! knew which one you were talking about without even clicking on the link :P

    but rocks and time still qualify as a computer.
    Last edited by MadHatter; February 17th, 2011 at 09:38 PM.

  11. #11
    Join Date
    Feb 2011
    Posts
    5

    Re: Who can help me?

    Oh my god!

  12. #12
    Join Date
    Feb 2011
    Posts
    5

    Re: Who can help me?

    Ah ha! hey everyone.
    I have a solution. Now I make two program, one by C# and one by vb6. Vb6 program will run automatically on pc then it checks exist .Net framework. If pc exist .Net framework then stop running vb6 program. If pc not yet install .Net framework so vb6 program auto download .Net framework setup file. When download finish vb6 program stop running on pc. And C# program just run when it called. So my problem now is how to make one vb6 program auto running on pc when pc start or started. I don't ever make vb6. Who can help me this problem.

  13. #13
    Join Date
    Mar 2004
    Location
    33°11'18.10"N 96°45'20.28"W
    Posts
    1,808

    Re: Who can help me?

    you should use an installer to install your product. by doing this you can check to see if .net is installed when the application is installed, and install it then. this way, every time your program runs you can be sure that .net is installed because the only way to get your program on the system is through the installer, and the only way for that to happen is if the installer checks the system and installs .net if its not already there.

    visual studio has a windows install editor built into it (at least the standard or pro editions do). otherwise you can use installshield, or NSIS (which is free).


    if you write a vb6 executable, what's to stop the user from deleting the vb6 program?


    do what everybody else does, and use an installer, and check for .net when the app is installed.

  14. #14
    Join Date
    Jan 2010
    Posts
    1,133

    Re: Who can help me?

    Quote Originally Posted by MadHatter View Post
    but rocks and time still qualify as a computer.
    A computer sensu lato... Waaay lato.

    Quote Originally Posted by BioPhysEngr View Post
    All you need is rocks and some time: http://xkcd.com/505/
    So... God is a programmer!
    OMG, OMG, OMG!

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

Featured