c# - Windows Forms Application to ARM64 (IOT)
问题描述
Is there a way to convert the project to UWP or should I use another approach? I need to deploy a Windows Forms Application written in C# with VS to Windows 10 IOT on a Raspberry Pi 3b. I've seen mention of a converter, but it seems it is used to publish the app to the Windows Store.
解决方案
您需要将应用程序重写为 UWP 应用程序。您提到的转换器(桌面桥)将允许打包您的 Windows 窗体应用程序以存储部署到桌面系统,但不适用于 IoT。
Windows 10 IoT 不包括 WinForms 应用所依赖的 UI 堆栈。这记录在Windows 10 IoT Core 文档中(为您的方案添加了重点)
不支持旧版 Win32 UI:IoT Core 不包含用于创建经典 (HWND) Windows 的 API。CreateWindow() 和 CreateWindowEx() 等传统方法或任何其他处理 Windows 句柄 (HWND) 的方法均不可用。随后, IoT Core 不支持依赖于此类 API 的框架,包括 MFC、Windows 窗体和 WPF
如果您的 UI 和底层逻辑是分开的,那么您可以保留所有或大部分逻辑层(UWP 支持 .Net Standard 2.0)并使用 UWP 的 Xaml 堆栈重写 UI。
推荐阅读
- c# - 为什么 JSON 响应即使是数组也不能反序列化为 List<>?
- ionic-framework - 如何覆盖离子3中特定按钮的特定页面的Scss
- sql-server - 我想在数据库列中添加一个检查,以便将数据输入其中的人应该大写并修剪
- csv - 执行 TEXT_IO 过程后如何从目标打开 CSV 文件
- javascript - 如何在 javascript 中向 - tic - tac - toe game tie 函数添加条件语句?
- reporting-services - SSRS 图表根据财政年度而不是日历年按月分组
- react-native - React Native TextInput setState() 隐藏键盘
- mongodb - 无法更新数组中的对象,猫鼬中的对象数组
- sharepoint-online - CSOM CreateSPAsyncReadJob 保持在队列状态
- server - 无法更改数字海洋水滴的root密码