Unable to get records. Could not load file or assembly

Problem

You get this error when running your application:

Unable to get records. Could not load file or assembly 'Microsoft.sqlserver.types, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies.  The system cannot find the file specified.

Solution

Download and install Microsoft SQL Server 2008 Feature Pack which is available at http://www.microsoft.com/en-us/download/details.aspx?id=8824

Download and install Microsoft Visual Studio 2008 Service Pack 1 if Microsoft Visual Studio is installed which is available at http://www.microsoft.com/en-us/download/details.aspx?id=10986

See Also

Part IX:  Troubleshooting Applications

Application Will Not Run

Application Runs But No Data is Displayed

Application Error Messages