SIGN UP MEMBER LOGIN:    
ARTICLE

Using Visual Studio .NET to Build and Deploy Applications

Posted by Doug Doedens Articles | Visual Studio .NET July 29, 2002
No matter how much time you spend designing your application there is one key stage where it can all fall apart, the build and deployment stage.This is a first in a series of articles in which I am going to demonstrate how to use Visual Studio .NET.
Reader Level:

No matter how much time you spend designing your application there is one key stage where it can all fall apart, the build and deployment stage. This is a first in a series of articles in which I am going to demonstrate how to use Visual Studio .NET to build and deploy your applications.

  1. To start open new Visual Studio .NET class library application named myAssembly.


  2. Next right click on the solution in the solution explorer and click Add New Project and name this project myAssembly2 and click ok.







    This is meant to simulate a solution with 2 or more assemblies, as you would have in an enterprise development environment.   This same process could be used with 70 assemblies all in the same solution file.  For now we will leave these assemblies as empty shells but they could have hundreds of lines of code in them doing anything you want.

  3. Next we need to again right click on the solution and choose add project but this time choose add set-up project to the solution, as demonstrated below:



    Click ok and now you should have a solution file with two assemblies and one set-up project.

  4. Now right click on the Set-up project shown in the solution explorer and choose Add Project output you should see the dialog shown below:




    Notice the drop down with the project label currently says myAssembly and the Primary output text is highlighted.  This is basically telling the installer program to take the primary output from the project myAssembly project and place it inside the MSI file.  Click ok and repeat this process but this time choose the myAssembly2 from the project drop down. (Be sure to again choose the project output).

    The solution explorer should now look something like the following:




    At this point it is important to understand that you could add more assemblies if you needed to and simply repeat the above process to add the primary outputs to the set-up project.  You can even build the project as is and by default the set-up project will not actually be built which comes in handy when testing and debugging an application.

  5. Finally right click on the solution icon in the solution explorer and choose properties.  Then click on the configuration section and click the build check box next to the set-up project name.



    This will tell the IDE to now build the set-up file when you compile the solution. *By default it will not compile the set-up project.

  6. Next right click on the solution in the solution explorer and click build.  This will build both projects in the solution and put the resulting assemblies into the MSI file.

You now should have a complete MSI file with the just compiled assemblies inside of it located in the debug folder where you created the project. If you double click on this MSI you will be prompted as to where you want to install the assemblies.

In summary this is the first in a series of articles outline the Visual Studio 7 Set-up projects and demonstrates how you can use the set-up projects as a build and deploy mechanism instead of using the wizards at the end of the process.

Login to add your contents and source code to this article
share this article :
post comment
 
Nevron Gauge for SharePoint
Become a Sponsor
PREMIUM SPONSORS
  • 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.
    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.
Team Foundation Server Hosting
Become a Sponsor