我正在使用Dapper、.NET Core 2和MySql.Data在Linux上创建一个小型REST。不幸的是,我一直在我的连接上出现这个错误:
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()有人知道这是怎么回事吗?
发布于 2017-08-31 21:27:03
我通过升级到8.0.8DMR来解决问题。
发布于 2017-08-30 12:42:39
尝试从nuget添加System.Security.Permissions, Version=4.0.0.0。
发布于 2017-08-29 20:56:50
我不知道发生了什么,但我也遇到了同样的问题。
我已经注意到,如果您查看解决方案下的DEPENDANCICES.NuGET节点并查看并展开它,您将看到有关使用.net Framework4.6.1还原的一些东西的警告消息。(无论如何,就我而言)
在我看来,作者在NuGet包中的一些内容是不正确的。
https://stackoverflow.com/questions/45942331
复制相似问题