Where's Msi.lib?
If you're developing
custom actions for Windows Installer or a bootstrapper in Visual Studio
2005, or utilizing the
resiliency and
install-on-demand features of Windows Installer in your product developed
in Visual Studio 2005, you might get link errors for Windows Installer
functions. Msi.lib was not included for x86 in the Platform SDK lib
directory if you installed Visual C++. It is present for x64 in the AMD64
sub-directory and the IA64 sub-directory, however. See
Visual
Studio 2005 Product Line Overview for what editions are affected.
In order to get msi.lib for x86 you need to install at least the
Windows Installer SDK feature of the Platform SDK. The libraries in the
AMD64 and IA64 sub-directories of Visual Studio 2005 RTM have the
same date stamp as msi.lib in the
Windows Server 2003 SP1 Platform SDK. Once installed you can either copy
msi.lib from \Program Files\Microsoft Platform SDK\Lib to \Program
Files\Microsoft Visual Studio 2005\VC\PlatfromSDK\Lib or what I recommend
is adding the Platform SDK directories in the Visual Studio 2005 options as
preferred directories.
- Start Visual Studio 2005
- Click on the Tools -> Options menu
- Expand Projects and Solutions, and select VC++ Directories
- Make sure "Executable files" is selected in the drop-down selection box
entitled "Show directories for:"
- Add the path to the bin folder under the Platform SDK
installation root, such as $(ProgramFiles)Microsoft Platform SDK\bin
- Select "Include files" in the drop-down selection box entitled "Show
directories for:"
- Add the path to the include folder under the Platform SDK
installation root, such as $(ProgramFiles)Microsoft Platform SDK\include
- Select "Library files" in the drop-down selection box entitled "Show
directories for:"
- Add the path to the lib folder under the Platform SDK
installation root, such as $(ProgramFiles)Microsoft Platform SDK\lib
You can choose to move these directories up past their corresponding
directories that begin with $(VCInstallDir)PlatformSDK. These are the
directories for the Platform SDK that ships with Visual Studio 2005. If you
don't, they will take precedence and msi.lib will be found eventually
using the new directories you just added anyway.