views:

58

answers:

3

Hey everyone,

I programmed an hour-sheet application and now I would like to publish it so people can install and run it.

I've tried the publish function of visual studio 2008 but this gives me a clickOnce application/installer that's really confusing, but it works when I run it, but when I export the installer to another pc it installs it crashes at the end of the install.

so I tried just coping the installed files but then the program crashes at startup.

Is there a simple way to compile the application to a simple standalone executable or maybe containing a separate folder containing the resources (images/classes)?

+4  A: 

You can copy the executable from bin\Release and it should work.

If it uses any DLLs that are not part of the .Net framework itself, you'll also need to copy those. (Set Copy Local to true in the properties for each reference)
If it uses any other files, you'll need to copy them to the right place or embed them in the EXE or a DLL.

SLaks
should they all be placed in the same folder?
Pieter888
Yes, they should. (Unless you handle `AppDomain.AssemblyResolve`)
SLaks
Thanks for the nice answer but psdesai's solution came with an installer and a user friendly interface. Your answer worked just fine though thanks for the help anyway :)
Pieter888
A: 

you can find your .exe here Projectpath\bin\Debug you have to give .config file too

BreakHead
+1  A: 

I would add Setup Project to your solution which will create a setup.exe.

Here's some of the links: http://www.dreamincode.net/forums/index.php?showtopic=58021 http://msdn.microsoft.com/en-us/library/ms235317.aspx

This will make sure that the dlls and assemblies are deployed to appropriate place when you install your software. It will also make sure that it gets rids of files when you uninstall it.

activebiz