Entity Framework cannot update database – SaveChanges() related to SetClrFeatureSwitchMap error

I had the issue with saving data to DB using Entity Framework and SaveChanges() method, and fixed it by adding the following lines to the web.config of my application:

  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <assemblyIdentity name="Microsoft.SqlServer.Types" publicKeyToken="89845dcd8080cc91" />
      <bindingRedirect oldVersion="" newVersion="" />

This forces the EntityFramework to use the version 10 of the SqlServer.Types.dll, which doesn’t have the Geometry type apparently.


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