Hi .NET Architects!
Visual Studio 2005 Setup and deployment Projects provides to make an exe or installer file in .NET windows application is easy and rapidly.
Visual Studio provides templates for four types of deployment projects: Merge Module Project, Setup Project, Web Setup Project, and Cab Project. In addition, a Setup wizard is provided to help step you through the process of creating deployment projects. You can see the templates and the wizard in the New Project dialog box under the Setup and Deployment Projects node.
The following are guidelines for choosing the right type of deployment project for your project.
1)Merge Module Project : Packages components that might be shared by multiple applications.
2)Setup Project : Builds an installer for a Windows-based application.
3)Web Setup Project : Builds an installer for a Web application.
4)Cab Project : Creates a cabinet file for downloading to a legacy Web browser.
5)Smart Device Cab Project : Creates a Cab project to deploy device applications.
This topic demonstrates deployment using a Setup and Deployment Project.
Setup Projects
Setup projects allow you to create installers in order to distribute an application. The resulting Windows Installer (.msi) file contains the application, any dependent files, information about the application such as registry entries, and instructions for installation. When the .msi file is distributed and run on another computer, you can be assured that everything necessary for installation is included; if for any reason the installation fails (for example, the target computer does not have the required operating system version), the installation will be rolled back and the computer returned to its pre-installation state.
The following steps will gives the elegant guidance to create an exe or installer file.
1, Go to file menu > click Add > new project >now “Add New Project” dialog will appear.
2.Select the “Other Project Types” and click “Setup and Deployment” projects,Choose “Setup Project”give name project name in name text box finally click OK.
3.New project appear in solution explorer,for eg., you have give the name “MyEXE” file will be displays with given name.
4.Right click the MyEXE > go View > click “File System”
5.You can see the “File System on TargetMachine”under three folders
Application Folder
User’s Desktop
User’s Program Menu
6.Select Application Folder and right click Add>Project Output>select Primary output
7. Select User’s Desktop richt click on the second window>click create new shortcut>select output file from Application folder>change the file name from primary output name to MyEXE
next >>
same procedure follows the user’s program menu also
8.If you want to change the Manufactures name for exe,just right click the project go to properties
change the properties as per you requirement
9.Finally Build the new project After successfully Build the project myEXE(Setup) will be appear in Application Debug or Release folder(depend upon the properties settings)
EXE or installer will be available on his physical path…
When you want to install the EXE on the client machine,you should be installed .NET Framework on that machine because, Applications and controls written for the .NET Framework v2.0 requires the .NET Framework Redistributable Package version 2.0 to be installed on the computer where the application or control runs.
February 19, 2008 at 1:37 pm
Thanks a lot. It helped me.
How to add .net framework2.0 within package. Pls help.
Thanking you in appreciation
Pratap557
December 9, 2009 at 1:41 pm
Thank you very very much.
I really want to learn it from long time
Thank you very much once again.
March 28, 2008 at 8:56 am
Hi
Thanks. It helped me a lot.
How can make my exe application to create a shortcut or icon on tray?
Please help me
Thanks
Shobha
April 10, 2008 at 3:03 pm
Thanx a lot dear. It’s easy to use and implement now i can explore it.
Thanx and Regards
Kailash Dhondiyal
April 22, 2008 at 7:32 am
It’s so easy to implement it. u r a genius.
Thanks
wongloon
April 30, 2008 at 2:11 am
How to use this procedure If i using COM component
May 24, 2008 at 1:02 pm
Hi,
A very Good way of expressing , that How we create the exe file in Windows Application ….
So,
Very Special Thank to ur Team….
Bye ! ! ! ! !
May 24, 2008 at 1:06 pm
Wanna some useful tips for gridview , I have bind the data but wanted some professional look and also some Images will display And address in taken from the database so how could i do this ..??
For better Formates and looks of datagrid ..?
Also wanted to know how to use Paging in DataTable
if i bound tha data with DataTable control in asp .net page…..
May 28, 2008 at 11:07 am
how to validate installation with product key
May 29, 2008 at 10:03 am
nice explanation
June 11, 2008 at 1:04 pm
Thanks dear,
it helps a lot really.
June 17, 2008 at 12:20 pm
dgg
July 3, 2008 at 5:38 am
Dear sir,
Thank you for the useful Information. Please tell me how can i create Setup file if my apllication contains Database file. I connected my database through Sql Server. Please help me. i also created dataset in my project.
Thanking you,
July 7, 2008 at 11:24 am
thanks a lot.
It has helped me to do my work much better.
Amit Sharma
July 8, 2008 at 1:57 pm
Hi,
First of all thanks to the wonderful post.
Got some doubts, How to include Microsoft SQL Server 2005 in this setup?? Also i need to include crystal reports also…
Would be great if u help me out…
August 12, 2008 at 7:36 pm
It is very useful thread
September 4, 2008 at 8:59 am
It very useful for software developer. Thanks a lot for this article.
Rajeev
Software Application Engineer
http://www.tech-soigne.com
September 6, 2008 at 5:29 am
hi…
thanks for the article …
I need some help…
My project is with VS2005, SQL SERVER 2005.. and crystal report too..
How can i add these into the setup files…
a quick reply will avoid my trouble..
I already developed the project … What should I do to install my application to the client machine which has only windows OS installed..
this is my first project … please provide me a solution from the base…
Thank you
regards
edwin
September 9, 2008 at 12:46 pm
Hello..
First of all i want to say thank you for giving such a nice and step by step article.Now i can create EXE with the help of your article ,you made it very simple now.
Thanking & Regards,
Uzair Aziz
September 25, 2008 at 1:43 pm
thank u very much , for Setup steps
October 5, 2008 at 5:52 pm
qwcqwcqwc
October 14, 2008 at 9:14 am
Thanks a lot. It helped me a lot.
How to add .net framework2.0 within package. Pls help.
October 16, 2008 at 8:41 am
Thanks…… it’s i very Useful for me…………
October 16, 2008 at 11:34 am
Thanks. Thanks a lot.
This article helps me to create setup file easily.
And also i want this article, to create the setup file with register key. It wil be more helpful for me. Thank u.
October 16, 2008 at 11:36 am
Thanks. Thanks a lot.
This article helps me to create setup file easily.
And also i want this article, to create the setup file with register key. It wil be more helpful for me. Thank u.
October 18, 2008 at 6:31 pm
Good for the experts but not so nice for the begineers
November 26, 2008 at 2:08 pm
Good publication, thanx Dude
December 2, 2008 at 7:33 am
It was realy helpful for me…i am begineer inC# .NET so plss tell me how to change the icon created after installation……
thanks & regards
shrawan
December 3, 2008 at 5:43 pm
Hi
Thanks for your document.
I want to merge an exe file(it is a patch of crystal report) to my installation.
When i add it as a file, it is not merged.
Also i am having that mentioned problem, about sql server 2000
Is it necessary to install client connectivity of sql server in client.
I am using .net1.1
Thanks
December 5, 2008 at 8:09 am
hi,
Though i know it, your way of explaining was really good…congratessssssssss………….
December 8, 2008 at 6:24 pm
Thanks Explore.net
Thanks for giving me an right steps of creating an exe
thats really help me
December 13, 2008 at 3:55 pm
Very thanks.
December 13, 2008 at 3:56 pm
Way of explanation is good
December 16, 2008 at 2:58 pm
hi
thanx for you yr docs .it is gr8 .but i want to set application installation path
how can i do it ???
thnx in advance .
December 17, 2008 at 8:08 am
hi,
Thanks a lot my dear friend…
and i have a doubut,how to add image(i.e icon) to our setup/exe ,it disply in desktop as notpad file.
pls help me pa..
December 20, 2008 at 8:04 am
@karthika
you will have to add the ico file from the exe properties. find the property ico and add the ico from the windows path.
question:
how to add .net framework 2.0 with the installer ??????? i think here no one has answer…..
Thanks
December 26, 2008 at 6:30 pm
hi,
guys, when I create a setup file , Databae is not inbuild in it. I am looking any tell me me how database can inbuild within setup so I need not to paste it program directory and increase security of database.
December 26, 2008 at 6:32 pm
need a quick response please. My project is under process.
January 8, 2009 at 4:19 am
man superb….thnks a lot……It’s so easy….
January 14, 2009 at 8:23 am
Please describe how to link database in this setup project
with sqlserver 2005
thank you
where is place DB in folder project .?
I add data base as Microsfot SQL SERVER DATABASE FILE
January 23, 2009 at 1:09 pm
hi ,
thanks a lot my dear!!
February 3, 2009 at 7:46 pm
thanks a lot
February 11, 2009 at 9:50 am
Hi ,
i m using Visual studio 2005 version in that i dont have this option…to convert exe file please help me to convert….
February 18, 2009 at 8:13 pm
Hi All,
is there any way to create a setup for both web based abd windows application?
For example I have a project created in VB in windows and 2 VB.NET in web projects. I want to create a setup project which will combine these 3 projects.
Thank you in advance,
Selami Ozlu.
February 22, 2009 at 12:34 am
Dude, Thanks for the tips. There’s no way I forgot to thanked an article like this! Woot~
March 4, 2009 at 5:38 am
yo buddy, really it helps me a lot… thank you very much…
its coolll….
March 7, 2009 at 7:52 am
Hi,
I am using visual studio 2003 C# ,I want to make setup for
web application using SQL 2000 DB and crystal report what the step for setup and necessary files to install in client machine?
Please help me.
March 14, 2009 at 3:46 pm
thanks a lot…!! it help us very much
March 16, 2009 at 11:20 am
Great thanks balanagaraj !
March 17, 2009 at 3:39 pm
hai
thank you very much
it really helps me a lot
am studying mca…and tomorrow is my review..
you helped me a lot thank you friend…
thanks,,,,
March 24, 2009 at 5:50 am
Nice article…
March 25, 2009 at 12:16 pm
Thank you for the useful Information. Please tell me how can i create Setup file if my apllication contains Database file. I connected my database through Sql Server 2005. Please help me
May 21, 2009 at 1:31 pm
Hi Sameer, Please add your MDF file in to the BUILD project itself and give the suitable connection strings to acces the DB
Here you can get more informations about connectionstrings : http://www.connectionstrings.com/
March 31, 2009 at 12:44 pm
thank you for your help, that is very nice article
March 31, 2009 at 5:12 pm
hi…I already created the exe file but since my database is not included I can’t use the application…how can I include the db into the setup file??
May 21, 2009 at 12:28 pm
Hi, Which DB you want to connect MDB or MDF?
April 7, 2009 at 7:23 am
you are great …
i was worred about the my .exe file
thanx a lot
April 15, 2009 at 5:40 pm
i can create the .exe and also i can setup it but i can not see the setuped program in my system ot other system it is being not working any setup as illustrated in yr site . please guide me how to work on it .
April 17, 2009 at 6:36 pm
Thanks a lot, this is a big doubt that I had and your explanition make resolve it, good How To…
April 20, 2009 at 3:52 am
Thz a lot. It helps me more.
April 22, 2009 at 7:06 am
If you ever want to see a reader’s feedback
, I rate this post for four from five. Detailed info, but I have to go to that damn google to find the missed parts. Thank you, anyway!
May 21, 2009 at 12:27 pm
Good Day Random,
Thanks a lot for your appreciation
April 29, 2009 at 3:59 am
Thanx a lot dear. It’s easy to use and implement now i can explore it…………………………
May 22, 2009 at 7:22 am
Nice, buddy. You have done a great job. I am doing my mca 6th semester trainings and i was searching for the answer which u have just narrated so efficiently.
Thanks a lot.
June 1, 2009 at 3:20 pm
thnx the article was useful.
June 1, 2009 at 9:02 pm
i have an app with a db..mdf included . i just did your steps. but when i run it ,it says
“An attempt to attach an auto-named database for file C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\aspnetdb.mdf failed. A database with the same name exists, or specified file cannot be Opened, or it is located on UNC share.”
what i shou do??
thanks you
June 2, 2009 at 3:44 pm
Thank you very much for your effort. Excellent article
June 15, 2009 at 5:48 am
how to change connection string into EXE file when we installed exe onto client mechine i m using sqlserver2000 for database my project in Vs2005
my project is completed please help as soon as possible
how to change connnection string ?
thanks
neeraj
June 17, 2009 at 10:57 am
Thanks,
it helps a lot really.
Is it possible to make setup file for Mac Operating System. So that i could run my application there also.
August 26, 2009 at 5:58 am
No Priyanka, You cant run the .NET application in MAC OS. because .NET applications works only in Windows OS.
June 15, 2009 at 6:08 am
try this string but with wql express, its not big deal
Data Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\myDatabase.mdf;Integrated Security=True;User Instance=True
June 16, 2009 at 9:21 pm
Thanks a lot.. great work
(“…”)
June 18, 2009 at 4:57 am
Hello…
When i install this newly created set.exe file, after installation application doesn’t start automatically. I have to start it manually. Is there any way to auto start the application after installation.
Thanks,
Priyanka
June 24, 2009 at 1:24 pm
hii, can u tell me which files are necessary to be attached alongwith the application, so that it runs on the client PC. my windows app has database files (.mdf). So which files should i attach and how..?
pls help..!
August 26, 2009 at 5:55 am
The answer is YES, If your application embedded with mdf file. You should add the MDF file while creating the setup.
July 7, 2009 at 10:02 am
Myapp.exe.config file is created during installing setup?
how to remove it?
August 26, 2009 at 6:01 am
Myapp.exe.config is the configuration file where we store the configuration items like connection strings and customize attributes..
July 31, 2009 at 8:51 am
thax a lot frnd.
it helped me lot ….
August 26, 2009 at 6:00 am
Always welcome Rahul..
August 9, 2009 at 9:38 am
thanks for that i am very happy
August 26, 2009 at 5:59 am
Sounds great.. Thanks Anish
August 18, 2009 at 6:52 am
its great….working fine….thanks a lot friend….u r jenius…….
August 26, 2009 at 5:59 am
Welcome Raj and Thanks for your words about me.
September 8, 2009 at 6:33 pm
HI sir
Really This Concept Is Enough To Build A Set UP File.,but Add one Good Example With is the Good Example.please attach one Example.
September 10, 2009 at 12:16 pm
Sure Anil,
I will add one sample application.
Thanks for your valuable feedback.
October 22, 2009 at 3:57 am
thanks….
this is very helpful for me….
October 22, 2009 at 2:58 pm
A Very BIG THANX !!!!!!!!!!!!!!!!
November 5, 2009 at 8:43 am
i was able to make a setup file
Thank you
the steps are easy to follow, thanks
November 5, 2009 at 9:39 am
thanks we got help from this blog….
friends these steps are really working…..
THANKS A LOT….
November 11, 2009 at 7:04 am
Thanks a lot.
for making it easy.. it helps a lot.
November 16, 2009 at 9:52 am
Thank you very much…….. You are my hero of the day sir.
November 17, 2009 at 10:30 pm
Thank you very much….. This article helped me alot
November 26, 2009 at 12:55 pm
hi
November 26, 2009 at 12:56 pm
LOVE KARAV MATE SHU KARAVU JOVE>>>>TE JANAVO>>>
December 18, 2009 at 12:38 pm
Hello,
Very useful post,Thanks
I don’t have the setup template, how can I get the template? can find it on net!
Thanks
December 24, 2009 at 3:54 pm
Hats off 2 u
Thanks dude!!!!
Its very useful