带有 .NET 5 和 WPF 的桌面桥接器 - 需要 RuntimeIdentifier 和独立模式吗?

问题描述

我有一个 .NET 4.7.1 WPF 应用程序,我通过桌面桥分发。我正在将它移植到 .NET 5。当我打包应用程序时,它坚持将 <RuntimeIdentifier>win-x64</RuntimeIdentifier> 添加到我的可执行文件中,当我这样做时,我在输出目录中获得了大量额外的 DLL。例如:

api-ms-win-core-console-l1-1-0.dll
Microsoft.VisualBasic.dll
PresentationCore.dll
PresentationFramework.Aero.dll
PresentationFramework.Aero2.dll
PresentationFramework.AeroLite.dll
PresentationFramework.Classic.dll
PresentationFramework.dll
PresentationFramework.Luna.dll
PresentationFramework.Royale.dll
...

还有其他几十个。有没有办法让桌面桥 + WPF + .NET 5 在没有所有额外 DLL 的情况下很好地协同工作?

(编辑) 经过更多调查,这似乎是已开启的“独立模式”。独立模式现在是强制性的吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)