带有MySql.Data的.NET Core 2导致权限错误 [英] .NET Core 2 with MySql.Data results in permission error

查看:235
本文介绍了带有MySql.Data的.NET Core 2导致权限错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Dapper,.NET Core 2和MySql.Data在Linux上创建一个小型REST API.不幸的是,我一直在连接上收到此错误:

I'm using Dapper, .NET Core 2 and MySql.Data to create a small REST API on Linux. Unfortunately, i keep getting this error on my connection:

Exception has occurred: CLR/System.IO.FileNotFoundException
An exception of type 'System.IO.FileNotFoundException' occurred in MySql.Data.dll but was not handled in user code: 'Could not load file or assembly 'System.Security.Permissions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.'
at MySql.Data.MySqlClient.MySqlConnection.AssertPermissions()
at MySql.Data.MySqlClient.MySqlConnection.Open()
at Dapper.SqlMapper.<QueryImpl>d__124`1.MoveNext()

有人知道发生了什么吗?

Does anyone have any idea what is going on?

推荐答案

我通过升级到8.0.8-dmr来解决.

I solved by upgrading to 8.0.8-dmr.

这篇关于带有MySql.Data的.NET Core 2导致权限错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆