简体   繁体   English

无法从UWP打包项目(UWP + Win32)构建ARM64

[英]Unable to build for ARM64 from UWP packaging project (UWP + Win32)

I'm working on a UWP application that has both a UWP app and a small Win32 program, linked from a UWP packaging project. 我正在开发一个UWP应用程序,该应用程序同时具有UWP应用程序和小型Win32程序,这些程序与UWP打包项目相关联。 My solution looks something like this: 我的解决方案看起来像这样:

  • OneLocker (UWP) OneLocker(UWP)
  • OneLocker.AutoTyper (Win32, WinForms in particular) OneLocker.AutoTyper(特别是Win32,WinForms)
  • OneLocker.Package (with references to the two above) OneLocker.Package(参考上面两个)

This all works fine, and if I try to create an app package just for the UWP application, I see all the various ARM/ARM64/x86/x64 options ( enter image screen here ), as I've followed the guide here to add the new ARM64 configuration. 这一切都很好,如果我尝试为UWP应用程序创建一个应用程序包,我会看到所有各种ARM / ARM64 / x86 / x64选项( 在此处输入图像屏幕 ),因为我已按照此处的指南添加新的ARM64配置。

The problem is that when I try to build the whole Package, including both the UWP app and the Win32 program, I only see the x86/x64 options ( enter image screen here ). 问题是,当我尝试构建整个包,包括UWP应用程序和Win32程序时,我只看到x86 / x64选项( 在此处输入图像屏幕 )。 Here is the complete .csproj file for the Win32 program in the package. 这是包中Win32程序的完整.csproj文件。

Now, I'm not 100% sure here, but from what I understand it should be possible to also build a UWP package project for ARM64 now, so that it'll run on devices with Windows on ARM without the need for the x86 to ARM emulation, right? 现在,我不是100%肯定,但据我所知,现在应该可以为ARM64构建一个UWP包项目,这样它就可以在ARM上安装Windows的设备上运行,而无需使用x86 ARM仿真,对吗?

If so, is there something specific I need to add to my projects, or something to configure, in order to enable the ARM64 build configuration for the packaging project as well? 如果是这样,为了为包装项目启用ARM64构建配置,是否需要将某些特定内容添加到我的项目或要配置的内容中? Or, is this even supported already at the moment? 或者,这是否已经支持了?

The only blog post I found about this ( this one ) only mentiones C++ UWP/Win32 applications, and not UWP packaging projects. 我发现的唯一一篇博文( 这篇 )只提到了C ++ UWP / Win32应用程序,而不是UWP打包项目。

Thanks! 谢谢!

EDIT : here's some clarification on what I'm trying to do. 编辑 :这里有一些关于我正在尝试做什么的澄清。 The main point for me is: I want to be able to build the app package (UWP + Win32) for ARM64 as well, so that users running Windows on ARM can use that instead of either the x86 package (which would be slower, as it'd be emulated), or the standalone UWP app in ARM64 (which would run fine, but lack the additional features of the package). 我的主要观点是: 我希望能够为ARM64构建应用程序包(UWP + Win32) ,以便在ARM上运行Windows的用户可以使用它而不是x86包(这将更慢,因为它是模拟的,或ARM64中的独立UWP应用程序(运行正常,但缺少软件包的附加功能)。

As I've mentioned earlier, this is what I see from the build window for the packaging project. 正如我之前提到的, 是我从包装项目的构建窗口中看到的。 I'm aware that WinForms doesn't support ARM64, and in fact I'd be perfectly fine having just the UWP app in the package built for ARM64, and the Win32 part in Any CPU. 我知道WinForms不支持ARM64,事实上,只有在为ARM64构建的程序包中的UWP应用程序和任何CPU中的Win32部分,我都会完全没问题。 The thing is that if I pick the Neutral/ARM64 combo from the first line (see the linked image), I then can't also pick the x86/x64 targets, as VS tells me I can't mix specific and neutral architectures in the same package. 问题是如果我从第一行选择Neutral / ARM64组合(参见链接图像),那么我就不能选择x86 / x64目标,因为VS告诉我我不能混合使用特定和中性架构相同的包裹。

To recap, here's what I'd want, in theory: 总结一下,理论上这就是我想要的东西:

  • x86 package (x86 UWP and WinForms) ✔ x86包(x86 UWP和WinForms)✔
  • x64 package (x64 UWP and WinForms) ✔ x64包(x64 UWP和WinForms)✔
  • ARM64 package (ARM64 UWP and Any CPU WinForms) ❌ ARM64包(ARM64 UWP和任何CPU WinForms)❌
  • ARM standalone UWP app ✔ ARM独立UWP应用程序✔

Is there any way to achieve this? 有没有办法实现这个目标?

The Windows Packaging Project will produce ARM64 packages if the referenced projects support this architecture. 如果引用的项目支持此体系结构,则Windows Packaging Project将生成ARM64包。 Actually WinForms, or any other .NET Framework, do not support ARM64. 实际上,WinForms或任何其他.NET Framework都不支持ARM64。

You can produce a bundle supporting different architectures that will optimize your UWP components and use the AnyCPU version for the WinForms. 您可以生成支持不同体系结构的包,这些体系结构将优化您的UWP组件并使用AnyCPU版本来实现WinForms。

Can you describe your application requirements and which architectures would you like to support in your packages? 您能描述一下您的应用程序需求以及您希望在程序包中支持哪些体系结构?

Thanks, Rido 谢谢,Rido

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM