question

DavidRickard-2923 avatar image
0 Votes"
DavidRickard-2923 asked ·

Desktop Bridge on .NET 5 forces "self-contained mode"

I have a .NET 4.7.1 WPF app that I'm distributing through Desktop Bridge. I'm working on porting this to .NET 5. When I package the application it insists on adding <RuntimeIdentifier>win-x64</RuntimeIdentifier> to my executables, and when I do this I get a ton of extra DLLs in my output directory, like it's building in self-contained mode. For example:

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
...

And dozens of others. Is there a way to get Desktop Bridge + WPF + .NET 5 working nicely together in framework-dependent mode?

windows-desktop-bridge
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

NicoZhu-MSFT avatar image
0 Votes"
NicoZhu-MSFT answered ·

Hello, Welcome to Micorosoft Q&A,

Desktop Bridge on .NET 5 forces "self-contained mode"

Currently, Net5 clickonce package and self-contained are not flawless, you could find the related issue in Github here. For your scenario, we suggest you edit your WPF project target framework to .NET 5, and package it with Windows application package project. Then build UWP sideload package. Or use WinUI3 project templates to make Bank app, Packaged project directly.


If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.