为什么 C# .NET 7 控制台应用程序在从 Rider IDE(在 Mac M1 或 Windows Server 2019 或任何环境上)执行时运行没有问题,但在发布到 Windows 时无法访问 MySQL (5.7或 Aurora)数据库,因为“‘MySql.Data.MySqlClient.Replication.ReplicationManager’的类型初始值设定项引发了异常”?
假设您的异常中存在与 ConfigurationManager 相关的错误,我可以说它不是 .NET Core 的一部分 使用 MySqlConnector 代替 MySqlData,前者不依赖 .NET Core 中的兼容包