Solved

c# how to deploy or install software

Posted on 2011-03-15
18
411 Views
Last Modified: 2013-12-17
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
0
Comment
Question by:jtran007
  • 8
  • 7
  • 2
  • +1
18 Comments
 
LVL 29

Expert Comment

by:anarki_jimbel
Comment Utility
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
 
LVL 29

Expert Comment

by:anarki_jimbel
Comment Utility
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
 
LVL 33

Expert Comment

by:Todd Gerbert
Comment Utility
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
 
LVL 12

Expert Comment

by:Mohamed Abowarda
Comment Utility
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
 

Author Comment

by:jtran007
Comment Utility
Hi ,

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

Regards,
JT
0
 
LVL 33

Expert Comment

by:Todd Gerbert
Comment Utility
How did you build your deployment package, how are you attempting to install it, and what is the exact error message?
0
 

Author Comment

by:jtran007
Comment Utility
Hi,
In VS I select publish from project property.

Regards,
JT
0
 
LVL 33

Expert Comment

by:Todd Gerbert
Comment Utility
What version of Visual Studio, and it is a Windows Forms application right, not an ASP.Net project?
0
 
LVL 33

Expert Comment

by:Todd Gerbert
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:jtran007
Comment Utility
Hi,
This is window application.

 publish.docx
0
 

Author Comment

by:jtran007
Comment Utility
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
 

Author Comment

by:jtran007
Comment Utility
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
 
LVL 33

Expert Comment

by:Todd Gerbert
Comment Utility
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
 

Author Comment

by:jtran007
Comment Utility
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
 
LVL 33

Expert Comment

by:Todd Gerbert
Comment Utility
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
 

Author Comment

by:jtran007
Comment Utility
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
 
LVL 33

Accepted Solution

by:
Todd Gerbert earned 500 total points
Comment Utility
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
 

Author Closing Comment

by:jtran007
Comment Utility
Thanks,
JT
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now