简体   繁体   中英

Getting exception while executing Azure function locally when trying to connect to local database

Azure 函数错误

Have installed nuget for System.Data.SqlClient 4.8.1. Getting below error on running

[5/28/2020 4:09:39 PM] Executed 'Function1' (Failed, Id=990d4cbf-bd32-4a77-ab52-8b5fb1dce252) [5/28/2020 4:09:39 PM] System.Private.CoreLib: Exception while executing function: Function1. FunctionAppDemo: Could not load file or assembly 'System.Data.SqlClient, Version=4.6.1.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621). System.Private.CoreLib: Could not load file or assembly 'System.Data.SqlClient, Version=4.6.1.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

Even when I downgrade to Version=4.6.1.1, I get similar error with version 4.5.1

I didn't reproduce your issue on my side. I am using .NET Core 2.0 and System.Data.SqlClient(4.8.1) .

在此处输入图像描述

Please go to Dependencies to check if System.Data.SqlClient is there.

If the dependency is there, you can refer to the solutions here .

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