Hello everyone, first of all I posted this thread on vbforums.com and so far haven't had much luck getting solutions. If needed I can provide the exact link to the thread but here is what I'm trying to do:

I've been trying to find out how to compile a simple exe file in Visual Studio Express 2012 and haven't had much luck. I did mess around with the publishing and the one other computer I tested the published application on didn't work. Any time I would try to launch it on the other computer the program immediately stops responding before the form even loads. It does have the proper .NET framework installed, that isn't the issue.

This is the first time I'm trying to deploy/publish a VB program, it's nothing major, very small and as far as I know it has no dependent files other than an .xml file in the project directory.

First question is how do I properly compile the program so I can distribute to other people where all they'd have to do is run it through an executable file?
(I tried the setup that was in the folder to install the program and that didn't work either, program still stopped responding on the other computer. However I would prefer that the user doesn't have to deal with installing the program at all, just run it through the exe)

Second question is how can I include the xml file in the executable so the user only has 1 file? Is this possible?

Last question, how do I find out which files I need to include? The only thing my program does is read data from an xml file and output some data based on user input.

A list box is populated with data from the xml file and when a user selects an item from the list box more list boxes are populated with the appropriate data. It's not doing anything fancy at all. The xml file is read into the program as an XDocument using the full file path.

Thanks in advance for any help. Let me know if there's any other information you need.

Thanks for the pdf, unfortunately though I think they removed that from the 2012 version. There is no other node when you try to add the installer. 2012 has something called clickonce which I guess is the new installer but when I used that to package the application it didn't work on the other computer. I got the stopped responding dialogue box before the app ever started.

Since it's an extremely simple program that doesn't do anything but read in data from an xml file I'm not sure why it would just crash before even loading. The app does work on the computer I created it on.

Edited 3 Years Ago by Eddie_B

Assuming that there are no other components to install on the target computer, you could try copying the entire bin folder containing the executable to the target computer.

@Reverend Jim
I did try copying the entire bin folder and including the xml file in there but that also had the same issue. It would stop responding before the form even loads. However it would be nice if I didn't have to distribute the program with all that junk that the user doesn't need if possible but at this point I think I'll take whatever I can get working.

I would still also like to know if it's possible to include the xml file inside of the executable somehow for future projects as well.

I will try the clickonce deployment again but I don't have much hope it will work.

------------

No such luck. Tried to publish the application again and same issue.

Edited 3 Years Ago by Eddie_B

I read the rules in this section of the forum and didn't see anything about bumping. I thought I would update a little bit.

Tried the program on a third computer and the same issue arises where it stops responding before the form loads. I had the task manager opened and the process runs for a few seconds and terminates, then I get the dialogue box that the program stopped responding. I tried copying both the debug folder and the folder created when I published through clickonce, neither of them work.

I've looked through several step by step videos and text tutorials on people publishing apps with clickonce and I just can't get them to run on another computer. It works perfectly fine on my own but not on any other computer. I've tried it on windows vista, 7 and I am running windows 8 on my personal computer (which it installs and works fine on through clickonce).

I also tried creating an entirely new project copying over the code and everything thinking maybe something got messed up in the old one but even with the new project I get the same issues after publishing and trying to run it on another computer.

All computers have .NET Framework 4.5 installed.

Edited 3 Years Ago by Eddie_B

Okay can't seem to edit, sorry for the triple post but my issue has sort of been resolved. Here's the full link to the thread I created on another forum: http://www.vbforums.com/showthread.php?725967-RESOLVED-Compile-windows-forms-application-into-an-executable

Feel free to remove if I'm not allowed to link to other forums. Basically the solution was don't use clickonce to publish... I'm sure I was doing something wrong but just build a release version of your app and distribute the release folder, use the exe in there to launch the app. The other two questions I can live without (making everything into a single exe and if it's possible to include the xml file in that exe). I don't think it's possible do create a single exe file with vb in visual studio 2012 but I could be wrong of course.

Edited 3 Years Ago by Eddie_B

This article has been dead for over six months. Start a new discussion instead.