Windows Develop Bookmark and Share   
 index > Windows Forms General > files needed
 

files needed

Hi

I have created a windows forms application and run it on computer no 2, but I'm unsure of what files to transfer to the computer 2 besides the exe file and the dll files. And is this the way to or do I have to publish the project each time I have made changes?

magmo  Wednesday, September 03, 2008 3:20 PM

In principle you only need the exe and the dll's. If you have config information you want to change, you should add the config file (yourapp.exe.config). In that case you do what we call an XCopy deployment, simply copying the relevant files.

The best way to ensure you get everything is to add an installer to your project. You can do that in VS by adding a Setup project to the solution, add Primary output to get your executables into the msi. Your program can then be installed properly, and also deinstalled from the Add/Remove Program panel.

The last, and possibly "smartest" way, is to do as suggested in the previous post, use a ClickOnce approach. You app can then be installed and upgraded automatically from a website.

- terje

OsirisTerje  Thursday, September 04, 2008 4:17 AM
Check out the ClickOnce functionality.
mpdan  Thursday, September 04, 2008 1:55 AM

In principle you only need the exe and the dll's. If you have config information you want to change, you should add the config file (yourapp.exe.config). In that case you do what we call an XCopy deployment, simply copying the relevant files.

The best way to ensure you get everything is to add an installer to your project. You can do that in VS by adding a Setup project to the solution, add Primary output to get your executables into the msi. Your program can then be installed properly, and also deinstalled from the Add/Remove Program panel.

The last, and possibly "smartest" way, is to do as suggested in the previous post, use a ClickOnce approach. You app can then be installed and upgraded automatically from a website.

- terje

OsirisTerje  Thursday, September 04, 2008 4:17 AM

Thanks for clearing that out. I did try the clickonce approach once but didn't like the fact that I was unnable to set where I wanted to place my application on the target computer and make custom shortcuts and so on like you can do if you create a setup project.

By the way I also experienced a very werd behaiviour after I created that clickonce option. When you do that it automatically check the "sign the clickonce manifest" option. And by doinfg so also created a cetificate with a expiretion date. I didn't think much of that and continued to work with my project making changes and just replaced the exe file whenever needed on the target computer. But after the certificate had expired my trouble started. It seemed that any changes I made in the code of the form.vb files was not seen on the target computer, but if I uncecked the "sign the clickonce manifest" option and then rebuild the application and replaced the exe file once more my code changes was seen and it worked as it should. This is very weird to me, and very hard to find out why it didn't work, I mean it worked just fine in my development enviroment but when I transfered the exe file to production no changes was reflected. And that seem to be caused by the fact that the signing of a certificate was checked and the certificate had expired.

Please respond if you can clarify this behaviour.

Cheers!

magmo  Thursday, September 04, 2008 6:22 AM

You can use google to search for other answers

Custom Search

More Threads

• application resolution independent
• Issue in ShowDialog()
• Showing .NET forms from within VB6 project: wrong Tab key behavior
• Windows Forms autotab
• How to capture a Webcam frame into JPG or PNG?
• Combox text foucs position intilize after text update event
• CheckBox CheckState Order
• how to get microsoft supported Lanugages in a Combobox
• A few questions
• Regarding Menu Bar..