Last few weeks, I have been working on Application Packaging stuff using all the widely used tools like InstallShield, WISE, WiX and Visual Studio Installer. So, I thought it would be good to post about how to Build the Installers developed using these tools with Team Build 2010. This post will focus on how to build the InstallShield generated packages using Team Build 2010. For the release of VS2010, Microsoft has partnered with Flexera who are the makers of InstallShield to create InstallShield Limited Edition, especially for the customers of Visual Studio.
First Microsoft planned to release WiX (Windows Installer Xml) with VS2010, but later Microsoft dropped WiX from VS2010 due to reasons which are best known to them and partnered with InstallShield for Limited Edition. It disappointed lot of people because InstallShield Limited Edition provides only few features of InstallShield and it may not feasable to build complex installer packages using this and it also requires License, where as WiX is an open source with no license costs and it has proved efficient in building most complex packages.
Only the last three features are available in InstallShield Limited Edition from the total features offered by InstallShield as shown in below list.
Feature
Limited Edition for Visual Studio 2010
Standalone Build System
Maintain a clean build machine by using only the part of InstallShield that compiles the installations.
InstallShield Best Practices Validation Suite
Avoid common installation issues.
Try and Die Functionality
RCreate a fully functional trial version of your product.
InstallShield Repackager
Create Windows Installer setups from any legacy installation.
Multilingual Support
Present installation text in up to 35 languages.
Microsoft App-V™ Support
Deploy your applications as App-V virtual packages that run without conflict.
Industry-Standard InstallScript
Achieve maximum flexibility in your installations.
Dialog Editor
Modify the layout of existing end-user dialogs, create new custom dialogs, and more.
Patch Creation
Build updates and patches for your products.
Setup Prerequisite Editor
Easily control prerequisite restart behavior and source locations.
String Editor View
Control the localizable text strings displayed at run time with this spreadsheet-like table.
Text File Changes View
Configure search-and-replace actions for content in text files to be modified at run time.
Virtual Machine Detection
Block your installations from running on virtual machines.
Unicode Support
Improve multi-language installation development.
Support for 64-Bit COM Extraction
Extract COM data from a 64-bit COM server.
Windows Installer Installation Chaining
Add MSI packages to your main installation and chain them together.
XML Support
Save time by quickly testing XML configuration changes to installation projects.
Billboard Support for Custom Branding
Display Adobe Flash billboards and other graphic files during the install process.
SaaS Support (IIS 7 and SSL Technologies)
Easily deploy Windows-based Web applications.
Project Assistant
Jumpstart a project by using a simplified set of views.
Support for Digital Signatures
Save time by digitally signing all your files at build time.
Easily Run Custom Actions
Schedule a custom action to run at precisely the right moment in your installation.
Installation Prerequisites
Check for and install prerequisites before your installation is executed.
To create a InstallShield project in Visual Studio and Build it using Team Build 2010, first you have to add the InstallShield Project template to your Solution file. If you want to use InstallShield Limited edition you can add it from FileàNewà project àother Project Types àSetup and Deploymentà InstallShield LE and if you are using other versions of InstallShield, then you have to add it from from FileàNewà project àInstallShield Projects.
Here, I’m using InstallShield 2011 Premier edition as I already have it Installed. I have created a simple package for TailSpin Application which has a Feature called Web, few components and a IIS Web Site for TailSpin application.
Before started working on this, I thought I may need to build the package by calling invoke process activity in build process template or have to create a new custom activity. But, it got build without any changes to build process template. But, it was failing with below error message.
C:\Program Files (x86)\MSBuild\InstallShield\2011\InstallShield.targets (68): The "InstallShield.Tasks.InstallShield" task could not be loaded from the assembly C:\Program Files (x86)\MSBuild\InstallShield\2010Limited\InstallShield.Tasks.dll. Could not load file or assembly 'file:///C:\Program Files(x86)\MSBuild\InstallShield\2011\InstallShield.Tasks.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
This error is due to 64-bit build machine which I’m using. This issue will be replicable if you are queuing a build on a 64-bit build machine.
To avoid this you have to ensure that you configured the build definition for your InstallShield project to load the InstallShield.Tasks.dll file (which is a 32-bit file); otherwise, you will encounter this build error informing you that the InstallShield.Tasks.dll file could not be loaded. To select the 32-bit version of MSBuild, click the Process tab of your build definition in Team Explorer. Then, under the Advanced node, find the MSBuild Platform setting, and select x86. Note that if you are using a 32-bit build machine, you can select either Auto or x86 for the MSBuild Platform setting.
Once I did above changes, the build got successful.