C# .NET - Compile to stand alone exe for C# app in Visual Studio 2010 express

Asked By koty on 24-Aug-11 06:19 AM
I've written an app in C#. I want this to compile to a stand alone exe file, but I don't know how to do this. can you help??
Jitendra Faye replied to koty on 24-Aug-11 06:23 AM

You just compile it. In the bin\Release (or bin\Debug) folder, the .exe will be in there.


If you're asking how to make an executable which does not rely on the .NET framework at all, then that's a lot harder and you'll need to purchase something like http://www.remotesoft.com/linker/intro.html. In general, it's not really worth the bother: Windows Vista comes with .NET framework 2.0 pre-installed already so if you're worried about that, you can just target the 2.0 framework (then only XP users would have to install the framework).

Reena Jain replied to koty on 24-Aug-11 06:24 AM
Hi,

Anything using the managed environment (which includes anything written in C# and VB.NET) requires the .NET framework. You can simply redistribute your .EXE in that scenario, but they'll need to install the appropriate framework if they don't already have it.
Ravi S replied to koty on 24-Aug-11 06:25 AM
Hi

Anything using the managed environment (which includes anything written in C# and VB.NET) requires the .NET framework. You can simply redistribute your .EXE in that scenario, but they'll need to install the appropriate framework if they don't already have it.
Riley K replied to koty on 24-Aug-11 06:27 AM
In the project location in the folder Bin-Debug you can find your executable file,

If at all you want to make a set up file of your app then you can create a setup package using 
visual studio

How to create a Setup package

  1. Start a new project by doing one of the following:
    • On the File menu, point to New, and then click Project.

      -or-
    • If you have an project open that you would like to create a setup package for, right-click Solution MyProject (where the name of your project is MyProject) in the Solution Explorer, point to Add, and then click New Project.
  2. In the New Project dialog box, select Setup and Deployment Projects in the Project Type pane, and then select the type of setup that you want in the Templates pane.

    The project is added to the Solution Explorer, and then the File System Editor opens.
  3. In the Properties dialog box, select the ProductName property, and then type the name of your product.
refer  this link

http://support.microsoft.com/kb/307353
koty replied to Riley K on 24-Aug-11 06:36 AM
thanks,
i tried to run the *.exe file in another computer (with net work  2.0)
but it didn't succeed to run it, and send en error report to Microsoft 
Asked By koty on 24-Aug-11 06:43 AM
how can i use the program mkbundle? 
Riley K replied to koty on 24-Aug-11 11:03 AM
Did u develop with targetting to 4.0

Install the latest .Net framework 4.0,

http://www.microsoft.com/download/en/details.aspx?id=17851