views:

35

answers:

3

I have a standard MSI being created using Visual Studio 2008.

Is there any way that I can have it copy the symbols of the exact DLLs and EXEs that were placed into the MSI somewhere so that I can use them for remote debugging of an installation from that MSI?

+1  A: 

I think you will have to add the debug symbols for all of the projects.

and add the output of your debug build in your setup project; the PDB files will be copied along with the executable when the application is deployed. This link might help.

KMan
I don't particularly want to ship and install the PDBs to the customer. I want them available if I need to remote debug the code though.
Spence
+1  A: 

You could create an extra table. Something equivalent to the Binary table, mapping strings (like names, or keys from the file table if you want to go that far) to your pdb files. They won't get installed, but they'll be in the MSI file that gets cached on the user's system. Then if you need a pdb file later, you can extract it from the cached database.

Ed
+1  A: 

Another way to do this is to use a conditional install flag and a public property.

Add your pdb files to the msi, but also create a new component in the msi, and associate the pdb files with that component.

Create a new public property in the msi, call it something like INSTALLDEBUGSYMBOLS. Have its value set to false. Set a condition on the new component to only install if the property is set to true. This means that during normal installation, the component containing the pdb files will be skipped. However you can at a later date re-run the msi, and override the value of the INSTALLDEBUGSYMBOLS flag, which will mean your component now gets installed (public properties can have their value set externally). To override that property, your command line will look something like this:

MyInstaller.msi INSTALLDEBUGSYMBOLS=true
slugster