Encountered an error hydrating edmx file

I have recently realised that after installing Visual Studio 2012 RC all the projects containing the edmx file fails to compile with the following message:

– Encountered an error hydrating the EDMX file

– Could not load file or assembly ‘Microsoft.Data.Tools.Schema.Sql, Version=11.0.0.0, Culture=neutral, PublicKeyToken=c15f5f6t12e50a1a’ or one of its dependencies. The system cannot find the file specified.

I have seen people talking about removing all Visual Studio versions and do a clean install which simply wasn’t acceptable to me so I found my answer on the Microsoft connect page

Cause:

This issue is caused by installing a pre-release version of Visual Studio 2012 on top of Visual Studio 11 Developer Preview as stated by “Entity Framework Team”

Workaround:

– close all Visual Studio instances

– delete the file C:\Program Files (x86)\MSBuild\4.0\Microsoft.Common.targets\ImportAfterMicrosoft.Data.Tools.Integration.targets
– open the solution in your favourite VS and try again.

It did work for me

Advertisements
This entry was posted in Microsoft Visual Studio. Bookmark the permalink.

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