简体   繁体   中英

Visual Studio upgrade to 2017 15.5.3 breaks solution

I have a webapi in dotnet core 2.0, from which I reference an old dll (.net 3.5) for the main purpose of data access to a database. Everytime I run the solution I am having

System.IO.FileLoadException: 'Could not load file or assembly 'System.Data.SqlClient, Version=4.2.0.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)'

Everything was working fine before the VS update to version 15.5.3

I had the same problem with my webapi (also netcoreappp2.0) and VS2017 15.5.3.

API is using ADO connections with "Systam.Data.SqlClient" provider. What I did is installation Systam.Data.SqlClient package from NuGet (ver. 4.4.2). After this the exception ceased to be thrown.

I got this error while using a net standard 2.0 lib inside a project. I finally discovered a bad format error. Made sure the project platform matched in my case x64.

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