none
create a c# exe file

    Question

  •  

    Hi

    How can I have a c# project, that is exe file (this file have exe suffix) and in other system that haven’t visual studio 2005, I can run that without installing c#.

     Generally how can I build a c# project with exe suffix? That my project just show form without code and form design.

    Thanks a lot   
    Sunday, January 27, 2008 11:36 AM

Answers

  • Hi,

      there are two types of executable projects you can have, a console application which is like a command window (dos terminal) or a windows forms application, both create an exe file,  you can see them when you create a new project in visual studio.

     

      Once you compile the project an exe file is created and users can run this on their computers without having visual studio installed.  This of course requires the user to have the version of C# runtime you used to create the project installed on their computer, so if you used .Net2.0 then they will need to have the 2.0 runtime installed (not visual studio just the runtime).

     

    Mark.

     

    Sunday, January 27, 2008 5:26 PM

All replies

  •  

    Hi,

     

    When you build your code in visual studio, the exe file is created in the obj->debug folder.

    Sunday, January 27, 2008 4:33 PM
  • Hi,

      there are two types of executable projects you can have, a console application which is like a command window (dos terminal) or a windows forms application, both create an exe file,  you can see them when you create a new project in visual studio.

     

      Once you compile the project an exe file is created and users can run this on their computers without having visual studio installed.  This of course requires the user to have the version of C# runtime you used to create the project installed on their computer, so if you used .Net2.0 then they will need to have the 2.0 runtime installed (not visual studio just the runtime).

     

    Mark.

     

    Sunday, January 27, 2008 5:26 PM
  • Can we generate that by the VS express version (such asC# express 2008)?


    Thanks & Best Regards, HuaMin Chen
    Monday, February 09, 2009 10:10 AM
  • HuaMin Chen said:

    Can we generate that by the VS express version (such asC# express 2008)?


    Thanks & Best Regards, HuaMin Chen



    Yes, also in Express Edition, you can create you project as a Console or Windows Form Application.
    On compiling and running your project, you will get an Executable in your project's bin->Debug or bin->Release folder.

    Just as described above by Mark Dawson & ronan001! :-)

    Thanks!
    Monday, February 09, 2009 12:29 PM
  • Many thanks BA!

     Similarly, in Visual web developer, I've built a page inside a solution. After I've successfully built the project (or solution), I can see that there is one DLL file, like "NewSite.dll" inside the BIN folder, where NewSite is the solution name. How to show and see (for testing it) the page there?
    Thanks & Best Regards, HuaMin Chen
    Tuesday, February 10, 2009 7:21 AM
  • Hi HuaMin Chen,

    Unfortunately I donot have Visual Web Developer, to be able to test your problem.

    However, it is possible, that instead of an application or web page, a DLL is being created by your project.

    Maybe you can check the output your project gives by going to:
    Project -> Properties -> Application (Tab) -> Output Type.


    Hope this helps!


    Please mark replies as answer or else as helpful, if it helped your cause. Thanks! :-)
    Tuesday, February 10, 2009 8:13 AM