c# how to deploy or install software

Hi,

I finish developing my application which has some text file located in the resources project.
My application is simple, it has 4 forms. Is there any tool to give to customer which run
it, and automatically install my application?

Thanks,
JT
jtran007Asked:
Who is Participating?
 
Todd GerbertConnect With a Mentor IT ConsultantCommented:
ClickOnce does seem to lend itself well to web-based deployments and simple applications, but that's not to say it wouldn't work.  However, if - for example - you absolutely need for your application to be installed to C:\Program Files, then ClickOnce is not for you.

I think by your screen shots you have Professional Visual Studio, so you can add a Setup project as anarki_jimbel suggested: http:#a35144019
0
 
anarki_jimbelCommented:
You need to create a setup project. I believe it woul;d be simple in your case.

Have a look at tutorials (or try to find yourself):
http://www.c-sharpcorner.com/UploadFile/rahul4_saxena/Setup08232007071849AM/Setup.aspx
http://msdn.microsoft.com/en-us/library/k3bb4tfd(v=vs.80).aspx

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

Again, it may depend on what VS you're using, 2005, 2008 0r 2010. But the approach nearly same.
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
Todd GerbertIT ConsultantCommented:
If you don't have the professional edition of Visual Studio there are a couple of third-party tools you can use to make an installation package, Installer2Go (http://www.witemsoft.com/togo/) and Advanced Installer (http://www.advancedinstaller.com/) are two that I have used and both have free editions available.

You also can deploy your application with "ClickOnce": http://msdn.microsoft.com/en-us/library/t71a733d%28v=vs.80%29.aspx
0
 
Mohamed AbowardaSoftware EngineerCommented:
You need to deploy the application, you can use ClickOnce which is available in Visual Studio:
http://www.kirupa.com/net/clickOnce.htm

You can also use free software:
http://www.jrsoftware.org/isinfo.php
0
 
jtran007Author Commented:
Hi ,

It said i can't start becaise it already intalled fron differetn sourece?

Regards,
JT
0
 
Todd GerbertIT ConsultantCommented:
How did you build your deployment package, how are you attempting to install it, and what is the exact error message?
0
 
jtran007Author Commented:
Hi,
In VS I select publish from project property.

Regards,
JT
0
 
Todd GerbertIT ConsultantCommented:
What version of Visual Studio, and it is a Windows Forms application right, not an ASP.Net project?
0
 
Todd GerbertIT ConsultantCommented:
So you went through the Publish Wizard, and your settings match the screen shots below?  And when you ran Setup.exe it didn't prompt you to install? Or trying to run the installed copy you get an error? Can you provide the exact error message?
1.png
2.png
3.png
0
 
jtran007Author Commented:
Hi,
This is window application.

 publish.docx
0
 
jtran007Author Commented:
Hi,

Then I just click Publish Now.
I tooke this folder and install on other computer, when I run setup I got the error message:


errorMessage.docx
0
 
jtran007Author Commented:
Hi,

Since mybridge.bin file is located in the "c:\updatepanel\updatepanel\resources" folder. How do I
specify this folder so that publish can located this file?

Thanks,
JT
0
 
Todd GerbertIT ConsultantCommented:
You're going to want to read through the documentation for ClickOnce here: http://msdn.microsoft.com/en-us/library/t71a733d(v=VS.100).aspx

You probalby just need to click the "Application Files" button in the Publish window to specify which files are installed with your application and/or specify the "Build Action" for your resource files as "Content". http://msdn.microsoft.com/en-us/library/0c6xyb66(v=VS.100).aspx

Make sure you read the documentation.



Untitled.png
0
 
jtran007Author Commented:
Hi,

I did as you suggested: for bridge.ico property I set the Build Action to Content. However
when I run setup, I still have the same error as I told you before.

Please advise.
JT
0
 
Todd GerbertIT ConsultantCommented:
I also suggested you read the instructions. ;)

You also need to re-build your application, and re-run the publish after changing the files' build action.

Also keep in mind that you can't control where files go when they're installed using ClickOnce - that means if you put "Form1.Icon = @"C:\someFolder\resources\form1.ico" in your program it's going to fail when it's installed (because the icon isn't in C:\someFolder\resources, it's in c:\users\jtran\appdata\local\blah\blah\resources") - instead you'd need to write "Form1.Icon = "resources\\form1.ico"

You should accept an answer here, have a read through the documentation, maybe setup a silly test project to experiment with, and ask additional questions - if you need to - as you encounter other problems.

Also see:
How to: Specify Which Files Are Published by ClickOnce (http://msdn.microsoft.com/en-us/library/kzy0fky2.aspx)

How to: Include a Data File in a ClickOnce Application (http://msdn.microsoft.com/en-us/library/6fehc36e.aspx)

Application Files Dialog Box (http://msdn.microsoft.com/en-us/library/xtkkwf3d.aspx)

Accessing Local and Remote Data in ClickOnce Applications (http://msdn.microsoft.com/en-us/library/d8saf4wy.aspx)

ClickOnce Cache Overview (http://msdn.microsoft.com/en-us/library/267k390a.aspx)
0
 
jtran007Author Commented:
Hi,

It seems to me ClickOne more appropriate for Web app. not for window. Is Setup
program is better suite?
Please advise.

Thansk for your time.

Regards,
JT
0
 
jtran007Author Commented:
Thanks,
JT
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.