How can I ensure that my MSI project is embedded in a package that is compatible with a specific version of msiexec?
Compatibility is usually an issue with lower versions. Windows Installer 4.5 is the latest version of Windows Installer and I expect it to be backward compatible. This way, the things you use will most likely be supported.
What you should worry about is compatibility with older versions of Windows Installer. Most IDEs for creating installers will let you know if you are using something that is only available after some version of Windows Installer.
If your IDE does not provide this feature, then you should know what all of you are using in your MSI and make sure it is available in the version of Windows Installer that you intend to configure with the installer.
a source to share
It depends on the tool you are using to create the MSI, you can specify the installer version you want there.
For example, WIX , which I use a lot , has an "InstallerVersion" attribute on the "Package" XML element . There I can specify which version of Windows Installer is required.
(I do not currently require the 4.5 installer as it has not been deployed all over the place yet, and I do not want clients to install the new installer on XP.)
Update:
Re-reading your question. I am under the impression that you are using a Visual Studio Installer project. I believe you can't customize the Windows Installer version there, but the default is Windows Installer 3. whatever (I'm not sure about the specific minor version). Installations created with this are compatible with Windows XP.
I don't believe you want to use a newer version of Windows Installer when using a Visual Studio setup project as the setup project is very limited in what it can do. Therefore, in order to require a newer version of the installer, you probably have a specific feature (eg elevation on Vista). To use this feature, you need a better build installer tool anyway (like WIX, Installshield or Wise or ...)
a source to share