Archived page · captured 2012-03-19

The version of SQL Server in use does not support datatype datetime2 and the Entity Framework.

Explains why a datetime2 error appears when an EDMX file from SQL Server 2008 runs on SQL Server 2005, and how to fix it.

Cause

The error occurs when an EDMX file is generated or updated from a SQL Server 2008 instance and then run against a SQL Server 2005 instance.

Fix

Open the EDMX file using the XML Editor and change ProviderManifestToken="2008" to ProviderManifestToken="2005". The hint came from Alex Duggleby.

Token change example

File settingPrevious valueCorrected value
ProviderManifestToken20082005

Archive details