Blue Theme Orange Theme Green Theme Red Theme
 
6 Months Free & No Setup Fees ASP.NET Hosting!
Home | Forums | Videos | Photos | Blogs | Beginners | Advertise with Us
 | Consulting  
Submit an Article Submit a Blog 
 Jump to
Skip Navigation Links
TechnologyExpand Technology
WebsiteExpand Website
Team Foundation Server Hosting
Search :       Advanced Search »
Home » Deployment » Deploying Programs in C#

Deploying Programs in C#

Deploying projects in Visual Studio.NET is fairly straightforward. Most of the process is automated for you through some convenient wizards so it doesn't require much effort. Keep in mind, though that you probably need the Windows Component Update Beta 1 on the machine you are deploying to. I suspect you also need the Microsoft .NET Framework, as well (for now).

Author Rank :
Page Views : 4113
Downloads : 0
Rating :
 Rate it
Level : Beginner
   Print Read/Post comments Post a comment  Similar Articles  
   Email to a friend  Bookmark  Author's other articles  
 
Team Foundation Server Hosting
Become a Sponsor
 Tag Cloud
 Latest Jobs
More ... 
 Latest Interview Questions
More ... 


Deploying projects in Visual Studio.NET is fairly straightforward.  Most of the process is automated for you through some convenient wizards so it doesn't require much effort.  Keep in mind, though that you probably need the Windows Component Update Beta 1 on the machine you are deploying to. I suspect you also need the Microsoft .NET Framework, as well (for now).   Also note that Microsoft states that the current Deployment may not work in the future:

"Caution   Installers and merge modules created with the Beta release may not be 100 percent compatible with final Visual Studio.NET versions. While we want you to explore deployment and test the technology, we also want you to make sure that you don't distribute any installers or merge modules created with this release."-MSDN

Once your application is completed in Visual Studio, you can deploy it using the following steps:

First,  choose Add New Project from the File Menu:

Once you've done this, choose Setup and Deployment Projects.  Visual Studio then gives you a list of options for deploying your project, depending upon whether you are deploying to the web, in a compressed .cab file or as a windows setup program. 

Below is the different types of project setups, their description ,and their purpose:

Project Setup Description Purpose
CAB Project A Microsoft Compressed Cabinet file that can be opened using cabarc.exe Used for deploying applications for download from the web
Deploy Wizard Creates Deployment files for either the web or as a windows installation using a .msi setup file
and deploying them to a remote machine or your own machine
Used for creating setup files and deployment of the project all at once.
Merge Module Packages components that are shared by different applications Deploys a library of components
Web Setup Wizard Creates an installation for web-based applications.  The installation will install into the virtual root directory on a web server Uded for creating an Installation for a web server
Setup Wizard Creates setup files for  a windows installation using a .msi setup file Used for creating setup files.  Seems to create only the .msi file with everything compressed into this file. Running places the program in the program files directory.

We will choose the setup wizard to deploy this particular application.  The setup wizard brings up a nice step by step dialog for creating our setup project:

As stated in the dialog,  the wizard creates an installer that you can use to install your project.  The next screen asks you what kind of installer you wish to create:

We want a plain old Windows setup, so we choose setup for a rich client application.  The next screen prompts us as to which files we would like installed:

If you just want to deploy the application with no source or documentation, then just choose Primary output. This will deploy the necessary exes and dlls for your application.  

The next screen prompts you for additional files such as readme.txt, web pages, or anything else you'd like to include in the install that Microsoft didn't think of. In the case of Hangman, we added the sound files:

The last screen is just a report informing you of what you've done and where the vdp (visual deployment project) is created:

When you click finish, a directory is created for deployment.  Now we need to build our project  in order to deploy it, so simply choose build solution from the build menu.  This will create the MySetupProject.msi file needed to install the application.

If we double click on MySetupProject.msi after it is created, it will launch the installation.  For most installations, this just means xcopying all the necessary files into a directory under program files.  In the case of the hangman project, these would be all the System.xxx.dll's, the Microsoft.xxx.dll's (CLR Libraries), nlp files (common language resources), the runtime class library mscorlib.DLL, mngdist.dll(not sure what it does, but I guess it manages distribution), xxx.wav (sound files) and of course our own executable(In this case Hangman.exe.)

Comment Request!
Thank you for reading this post. Please post your feedback, question, or comments about this post Here.
Login to add your contents and source code to this article
 [Top] Rate this article
 
 About the author
 
Mike Gold

Michael Gold is President of Microgold Software Inc., makers of the WithClass UML Tool. His company is a Microsoft VBA Partner and Borland Partner. Mike is a Microsoft MVP and founding member of C# Corner. He has a BSEE and MEng EE from Cornell University and has consulted for Chase Manhattan Bank, JP Morgan, Merrill Lynch, and Charles Schwab. Currently he is a senior developer at Finisar Corp. He has been involved in several .NET book projects, and is currently working on a book for using .NET with embedded systems.

He can be reached at mike@c-sharpcorner.com

Looking for C# Consulting?
C# Consulting is founded in 2002 by the founders of C# Corner. Unlike a traditional consulting company, our consultants are well-known experts in .NET and many of them are MVPs, authors, and trainers. We specialize in Microsoft .NET development and utilize Agile Development and Extreme Programming practices to provide fast pace quick turnaround results. Our software development model is a mix of Agile Development, traditional SDLC, and Waterfall models.
Click here to learn more about C# Consulting.
 
Introducing MaxV - one click. infinite control. Hyper-V Hosting from MaximumASP.
Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
Dynamic PDF
ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications.
Nevron Chart for .NET 2010.1 Now Available
The leading .NET charting control now features PDF, Flash and Silverlight export, visualization of large datasets and more. Deliver true charting functionality to your BI, Scorecard, Presentation or Scientific apps. Download evaluation now.
ASP.NET 4 Hosting
Get 2 Months Free of ASP.NET Hosting for Only $4.95/month! Receive FREE MS SQL and MySQL Databases Including ASP.NET 4/3.5, MVC 3.0, Silverlight 4, Windows 2008/IIS 7.0 Plus FREE IIS 7 Modules. Host UNLIMITED ASP.NET Web Sites – Click Here!
 
 Post a Feedback, Comment, or Question about this article
Subject:
Comment:
Nevron Gauge for SharePoint
Become a Sponsor
 Comments
kobe by I got you On December 7, 2010

Good reading.

Reply | Email | Modify 

 © 2012  contents copyright of their authors. Rest everything copyright Mindcracker. All rights reserved.