C# 参考类型system.iClonable';声明它已在system.runtime中定义,但找不到

C# 参考类型system.iClonable';声明它已在system.runtime中定义,但找不到,c#,.net,C#,.net,我在“new SqlConnection”行中遇到此错误 .netcore 2 web应用程序 这是包含在.netstandard类库中的代码,该类库具有以下nuget包: system.runtime 4.3.1 系统配置 我真的不知道这里有什么问题,这是我的第一个.netcore应用程序,所以这里可能缺少一些业余的东西 using System; using System.Collections.Generic; using System.Data.SqlClient; using Sys

我在“new SqlConnection”行中遇到此错误

.netcore 2 web应用程序 这是包含在.netstandard类库中的代码,该类库具有以下nuget包:

system.runtime 4.3.1

系统配置

我真的不知道这里有什么问题,这是我的第一个.netcore应用程序,所以这里可能缺少一些业余的东西

 using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Text;
using EP.Data.Helper;
public class BaseDALayer
{
    private void ExecuteStoredProcedure()
    {
        try
        {
            string connectionString = ConfigurationHelper.GetConnectionString();
            using (var connection = new SqlConnection(connectionString))
            {

            }
        }
        catch (Exception ex)
        {
            LogException(ex);
        }
    }

    private void LogException(Exception ex)
    {

    }
}

将MySql.Data nuget包更新到最新版本(在我的例子中是v8.0.23)解决了这个问题

我遇到了同样的问题,您是否找到了解决方案?