mysql - 使用 Visual Studio 在 WINDOWS STORE 中发布带有 Mysql.dll 的 UWP 时出错

标签 mysql uwp windows-store-apps

我在发布到 Windows 应用商店 (microsoft) 时遇到以下错误。

API CreateFileW in kernel32.dll is not supported for this application type. MySql.Data.dll calls this API.

API MapViewOfFile in kernel32.dll is not supported for this application type. MySql.Data.dll calls this API.

API OpenFileMappingW in kernel32.dll is not supported for this application type. MySql.Data.dll calls this API.

API AcquireCredentialsHandleW in secur32.dll is not supported for this application type. MySql.Data.dll calls this API.

API CompleteAuthToken in secur32.dll is not supported for this application type. MySql.Data.dll calls this API.

API DeleteSecurityContext in secur32.dll is not supported for this application type. MySql.Data.dll calls this API.

API FreeCredentialsHandle in secur32.dll is not supported for this application type. MySql.Data.dll calls this API.

API InitializeSecurityContextW in secur32.dll is not supported for this application type. MySql.Data.dll calls this API.

API QueryContextAttributesW in secur32.dll is not supported for this application type. MySql.Data.dll calls this API.

最佳答案

该错误非常明显 - UWP 不支持 MySQL.Data.Dll 使用的 API。

如果您想发布到 Microsoft Store,您有几个选择:

  1. 如果可能,请寻找与 UWP 兼容的 MySQL 版本。其中一些 API 故障可以用更新的 API 调用轻松替换,而其他故障对于应用程序本地数据库可能没有意义。
    • 我们一直在努力提高与现有代码的兼容性,但目前我们无法/不支持所有这些 API。
  2. 如果您无法获得符合 UWP 的 MySQL 版本,请尝试其他数据库,例如 SQLite。 SQLite 现在是 built-in to Windows如果您需要支持 14393 之前的 Windows 版本,则可以在应用中提供与 UWP 兼容的版本
  3. 如果您必须使用 MySQL 并且无法获得符合 UWP 的版本,您可以尝试发布为 Desktop Bridge 应用
    • 不过,这需要特殊权限,而且目前您无法将此类旧版 API 调用与现代 XAML UI 混合使用 - 它们必须位于单独的进程中。

关于mysql - 使用 Visual Studio 在 WINDOWS STORE 中发布带有 Mysql.dll 的 UWP 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49498620/

相关文章:

c# - .NET Windows 应用商店应用程序中 CultureInfo.GetCultures 的替代品

php - 如何保存 portlet 位置

c# - UWP 使用中的 SecureString

c# - UWP 中的组合框 SelectedItem 和绑定(bind)

c# - UWP - 框架导航似乎会导致非托管内存泄漏

api - Windows存储api以访问 metro 和电话应用程序信息

MySQL GROUP BY/ORDER BY 与平面消息表/线程的问题

mysql - 使用 Marathon 在 Mesos 上部署 Mysql

mysql - 加快 mysql 转储和导入

c# - 如何访问 Windows 8.1 商店应用程序中子部分内的控件?在可视化树中搜索不起作用