简体   繁体   中英

Could not load file or assembly 'Microsoft.SqlServer.Types, Version=11.0.0.0

I was starting to work on my application which I haven't touched for about a month and when I run the application and try to save a change I get the following error

Could not load file or assembly 'Microsoft.SqlServer.Types, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.":"Microsoft.SqlServer.Types, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"} System.Exception {System.IO.FileNotFoundException}

I have no idea why this error is all of a sudden showing up cause the last time I ran this application, I never encountered this problem so I'm at a loss where this is coming from. It happens on the Context SaveChanges event but when the error shows up I can hit the run button again and it will continue on as if nothing happened. After I do that, all successive attempts to save will work without showing the error but if I restart the application, it will show up again. My application is a Windows Form app using .NET Framework and Entity Framework 4 and the database is Sql Server 2005. Any thoughts on what could be causing this problem?

Thanks

I had the same problem where all of a sudden my reports were not coming up.

So i wen to my web.config for the project where your reports view is.

Paste this code as is in the assemblybinding tags.

  <dependentAssembly>
    <assemblyIdentity name="Microsoft.SqlServer.Types" publicKeyToken="89845dcd8080cc91" culture="neutral" />
    <!-- <bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" /> -->
    <bindingRedirect oldVersion="0.0.0.0-14.0.0.0" newVersion="14.0.0.0" />
  </dependentAssembly>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM