MAUI,就像哪吒一样,久久不能释怀。。。。。。。。

安卓虚拟机演示正常,用真机调试出不兼容的提示,去下载了对应SDK

 

继续调试还是闪退

报错:

严重性    代码    说明    项目    文件    行    禁止显示状态
错误        XA0137: The 'run-as' command failed with 'run-as: Could not set capabilities: Operation not permitted
'.
Fast Deployment is not currently supported on this device.
Please file an issue with the exact error message using the 'Help->Send Feedback->Report a Problem' menu item in Visual Studio
or 'Help->Report a Problem' in Visual Studio for Mac.
Please set the 'EmbedAssembliesIntoApk' MSBuild property to 'true' to disable Fast Deployment in the Visual Studio project property pages, or edit the project file in a text editor.             0    

大致意思:

严重性代码说明 项目文件行禁止显示状态
错误 XA0137: 'run-as' 命令失败 'run-as: 无法设置功能: 不允许操作
'
此设备当前不支持快速部署。
请使用 Visual Studio 中的“帮助->发送反馈->报告问题”菜单项提交包含确切错误消息的问题
或 Visual Studio for Mac 中的“帮助->报告问题”。
请将“EmbedAssembliesIntoApk”MSBuild 属性设置为“true”以禁用 Visual Studio 项目属性页中的快速部署,或在文本编辑器中编辑项目文件。 0

 

 去掉就可以了

UI演示目前都还正常

但是数据链接没搞好

System.Data.SqlClient 引用安卓项目无法链接SQL了,编译报错

Microsoft.Data.SqlClient 编译成功,可安卓运行时,点击按钮总是报错(Windows平台运行稳定)

var conn = new SqlConnection(SqlConnectionStatement);
        conn.Open();
        SqlCommand cmd = new SqlCommand();
        cmd.CommandText = "update aTable set csmc='MAUI更新测试数据' where csid=9";
        cmd.Connection = conn;
        cmd.ExecuteNonQuery();
        conn.Close();

一点击添加按钮,conn.Open报错

System.Exception
  Message=A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 35 - An internal exception was caught)

网上也有相关的资料,可是都没解决,包括微软的那个SQL文档解释

用windows桌面程序运行不报错,用Android就报错,搞不懂,有大神知道的劳驾留言指导一下,不胜感激!