带有 XBAP 的 x86 TargetPlatform

发布于 2024-08-08 22:39:20 字数 366 浏览 3 评论 0原文

我有一个 XAML 浏览器托管应用程序 (XBAP) 项目,该项目依赖于另一个仅 x86 的项目。如果我将目标平台保留为“任何 CPU”,那么在运行时(关于获取 DLL)就会出现各种混乱。但是,如果我将 XBAP 项目切换到目标 x86,则会出现以下编译时错误:

错误 7 - 无法构建 特定于平台的 XAML 浏览器 应用。如果 HostInBrowser 属性 设置为“True”,或者不设置 PlatformTarget 属性或设置它 到“AnyCpu”。

有解决办法吗?或者我是否必须为此*找出一些可怕的多进程+IPC解决方案?

*光是想到这一点就让我感到恐惧

I've got a XAML Browser Hosted Application (XBAP) project that has a dependency on another project that is x86 only. All sorts of hell breaks loose at runtime (with respect to grabbing the DLLs) if I leave the target platform as "Any CPU". However, if I switch the XBAP project to target x86, I get the following compile time error:

Error 7 - Cannot build a
platform-specific XAML Browser
Application. If HostInBrowser property
is set to 'True', either do not set
the PlatformTarget property or set it
to 'AnyCpu'.

Is there a work around for this? Or am I going to have to figure out some horrific multi-process + IPC solution for this*?

*The mere thought of which fills me with terror

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

空袭的梦i 2024-08-15 22:39:20

如果您的依赖 .dll 没有任何到 win32 本机 dll 的链接,您可以在 Reflector 中将其反汇编并将其重新编译为 Any CPU,或者如果可能的话获取 Any CPU 版本。如果它有 win32 链接,那么我认为你必须按照你的建议将它分成多个进程。

If your dependent .dll don't have any links to win32 native dll's you could dissasemble it in Reflector and recompile it as Any CPU, or get an Any CPU version if possible. If it has win32 links, then I think you have to split it into multi procs as you suggest.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文