0

I have completed my program and would like to send that program in its compiled state to other pc's.

I understand that in the Debug folder there is the programName.exe file, which when I open it on the PC I created it with - it opens. But if I send that .exe file to other pc's, it crashes or simply doesnt run!

Is there a way for others to see and use my program without installing visual studio?

I have asked this question before on another programming website with not much help, this is the link that they showed me, which i then followed:

http://www.dreamincode.net/forums/topic/58021-deploying-a-c%23-application-visual-studio-setup-project/#-application-visual-studio-setup-project/

The installer installs the program, but there is no files with it to open!

4
  • 1
    please post the error message that you get. if you have other stuff in the debug folder, you need to ship everything, not just the .exe, I hope this helps Commented Jun 19, 2012 at 18:26
  • 1
    @BigEndian, I have tried this too.. sent the whole debug folder but when opening the .exe file which compiles perfectly, it crashes, does not even open. there is no error messages. Commented Jun 19, 2012 at 18:29
  • Also, what you find in your "Debug" folder is not optimized to be sent out but rather only for debugging as the folder name suggests (this isn't your issue but a sidenote to keep in mind) Commented Jun 19, 2012 at 18:31
  • Are you compiling to a specific platform? i.e. Are you compiling to x64 and then trying to deploy to an x86 machine? Commented Jun 19, 2012 at 19:20

4 Answers 4

4

Other machines won't need to have Visual Studio installed - but they will need the appropriate version of .NET, depending on what you built against. If you target the "client" profile, the .NET distribution is fairly small.

You could build a setup project which kicks off the .NET framework installation if necessary, but it's likely to be quite a lot of work - in many cases it's probably simpler just to tell people what they need to install first, particularly if this is for personal use or friends/family.

Sign up to request clarification or add additional context in comments.

7 Comments

I understand this too.. and I install the .net framework on them then open the exe file from the debug folder, but it wont even open, just crashes!
@cameron: How does it crash? What version of the .NET framework are you building against, and what have you got installed? Have you tried with a very simple program which just displays an empty form?
when I double click the .exe, it shows a spilling wheel then after a few moments it pops up with the visual studio debug crash screen which says find a solution to this problem or debug. I am using Visual Studio 2010. I am not sure how to check what .NET framework I have building against.. any ideas for me to check?
@cameron: With no other information or any other way to get more information? What happens if you click debug? As for checking what version of the framework you're building against - it's in your project properties, in the Build tab.
I am not sure what your asking for. My Properties tab in the program says: Tagrget Framework = .NET Framework 4 Client Profile. is this what you required to know?
|
1

There are most likely other DLLs that your project is dependent on that do not get copied over when only transporting that .exe file. You COULD just copy those over as well.

However, the best practice is to add a new Project under Setup for a Installer. It should detect those dependencies. Then the other users will just have to run the setup.exe that gets created (but you have to include the other folders and files that get generated). Open up the File System Editor tab of the Installer project. Then inside the Application Folder, I right click on "Primary output from [Main Project] (Active)", then select "Create Shortcut to ..." and drop the Shortcut into the Program Files and User Desktop folders on the left.

For something simple, the other DLLs should be fine.

7 Comments

@Kill, as the link I posted shows, I went through the process of creating a new project under setup installer, went through all that process and it said it included the dependancies. The setup is built successfully with the Primary Output of my program which is all I want. I install it successfully, but no files or folders for the installation are found on my PC, except for when i come to uninstalling it and then it is shown in that screen.
You need to Copy the Primary Output from your Main Project and save a Shortcut to it in your Program Files folder and User's Desktop would not hurt either.
You should also build your Installer in Release mode, as opposed to Debug. Just a thought. It's always rough when you get no exceptions, or exceptions that are so general they don't help figure out what's wrong.
@kill, When you say Copy the primary output to the program files menu - I have enables the AlwaysCreate feature on this and also User's Desktop. Is this what you meant?
|
0
  1. Create the MSI Installer project for your application.
  2. Copy your project output as input of MSI Installer.
  3. .Exe is depends on .msi file, so when you click the .exe must verify the msi file existed in same directory.
  4. Verify the .Net framework and Installation 3.0 before run the .exe or .Msi file.

Comments

0

The easiest approach would be:

1: Right click on your Solution Explorer and add a new project. The new project would be a Setup project, which would be under Other Projects -> Setup and Deployment -> Visual Studio installer and then choose Setup Project from the right side. 2: Add all your bin folder files to Application folder and then build your solution. 3: It will create a file with .msi extension. You can distribute that to anyone you want and they wouldn't need any VS.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.