In order to specify a prerequisite to your deployment package something called a bootstrapper is needed. Unfortunately Microsoft do not provide a bootstrapper for the Chart Controls for the .Net Framework.
Luckily it is not too difficult to create your own bootstrapper.
Firstly you need to locate the folder in which the bootstrapper files need to be. On my machine this is here: C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\Now you can either download the files that I have put together here and extract the contents of the zip file into this folder, or follow the instructions below to create the files yourself.
The zip file contains all the files required including the full MS Chart controls installation package, which you probably already have. So you may find it simpler to create the files yourself.
<?xml version="1.0" encoding="utf-8" ?> <!-- Bootstrapper for MS Chart Controls. Created by Phil Preen, Feb 2009, use at your own risk --> <Product xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper" ProductCode="Microsoft.ChartControls"> <RelatedProducts> <DependsOnProduct Code="Microsoft.Net.Framework.3.5.SP1" /> </RelatedProducts> <PackageFiles CopyAllPackageFiles="false"> <PackageFile Name="MSChart.exe" HomeSite="MSChart.exe" /> </PackageFiles> <InstallChecks /> <Commands> <Command PackageFile="MSChart.exe"> <ExitCodes> <DefaultExitCode Result="Success" /> </ExitCodes> </Command> </Commands> </Product>
<?xml version="1.0" encoding="utf-8" ?> <!-- Bootstrapper for MS Chart Controls. Created by Phil Preen, Feb 2009, use at your own risk --> <Package xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper" Name="DisplayName" Culture="Culture" LicenseAgreement="eula.rtf" > <PackageFiles> <PackageFile Name="eula.rtf"/> </PackageFiles> <!-- Defines a localizable string table for error messages--> <Strings> <String Name="DisplayName">Microsoft Chart Controls for Dotnet Framework 3.5 SP1</String> <String Name="Culture">en</String> <String Name="AdminRequired">Administrator permissions are required to install Microsoft Chart Controls for Dotnet Framework 3.5 SP1. Contact your administrator.</String> <String Name="AnotherInstanceRunning">Another instance of setup is already running. The running instance must complete before this setup can proceed.</String> <String Name="GeneralFailure">A failure occurred attempting to install Microsoft Chart Controls for Dotnet Framework 3.5 SP1.</String> </Strings> </Package>
Microsoft Chart Controls will now appear in the list of prerequisites in your Visual Studio deployment settings.
Note that because Microsoft Chart Controls is dependant upon the .Net Framework 3.5 SP1. It is necessary to have the Framework files available. See the instructions in the Visual Studio 2008 SP1 readme file here (see Section 22.214.171.124).