Link to home
Start Free TrialLog in
Avatar of jtran007
jtran007

asked on

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
Avatar of Dmitry G
Dmitry G
Flag of New Zealand image

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

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.
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
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
Avatar of jtran007
jtran007

ASKER

Hi ,

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

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

Regards,
JT
What version of Visual Studio, and it is a Windows Forms application right, not an ASP.Net project?
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
Hi,
This is window application.

 publish.docx
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
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
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
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
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)
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
ASKER CERTIFIED SOLUTION
Avatar of Todd Gerbert
Todd Gerbert
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks,
JT