All SSDL artifacts must target the same provider. The ProviderManifestToken ’2008′ is different from ’2005′ that was encountered earlier.

All SSDL artifacts must target the same provider. The ProviderManifestToken ’2008′ is different from ’2005′ that was encountered earlier.

 {“Schema specified is not valid. Errors: \r\naaw.App_Code.Model.ssdl(2,93) : error 0169: All SSDL artifacts must target the same provider. The ProviderManifestToken ’2008′ is different from ’2005′ that was encountered earlier.”}


Targeting the Correct SQL Server Version

The Entity Framework targets the Transact-SQL query based on the SQL Server version that is specified in the ProviderManifestToken attribute of the Schema element in the storage model (.ssdl) file. This version might differ from the version of the actual SQL Server you are connected to.

Note:

The ProviderManifestToken attribute defines the version of SQL Server instance, not the Compatybility Level of the database. The Database Compatybility Level on the SQL Server 2008 could be 2005 or 2008, and the ProviderManifestToken still must be set up as 2008.

Workaround:

Search by “ProviderManifestToken”:


Or right click on the .edmx file and select Open with XML Editor.

Open Entity Framework .edmx file:

Change the ProviderManifestToken to 2008:


Known Issues in SqlClient for Entity Framework (Source: http://msdn.microsoft.com/en-us/library/bb896273.aspx )

For example, if you are using SQL Server 2005, but your ProviderManifestToken attribute is set to 2008, the generated Transact-SQL query might not execute on the server. For example, a query that uses the new date time types that were introduced in SQL Server 2008 will not execute on earlier versions of the SQL Server. If you are using SQL Server 2005, but your ProviderManifestToken attribute is set to 2000, the generated Transact-SQL query might be less optimized, or you might get an exception that says that the query is not supported.

Certain database behaviors depend on the compatibility level set to the database. If your ProviderManifestToken attribute is set to 2005 and your SQL Server version is 2005, but the compatibility level of a database is set to “80″ (SQL Server 2000), the generated Transact-SQL will be targeting SQL Server 2005, but might not execute as expected due to the compatibility level setting.

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 82 other followers