Converting a .Net dll to a .Net Core dll

2019-07-28 19:08发布

问题:

We have this application written in Visual Basic (Windows Form Application) and I am tasked to convert it to Universal App (UWP). the said application uses a dll that is specific to .Net Framework so in order to convert it into a Universal App, I need to have a dll that is targeting .Net Core.

Is there a way to do it?

I know nothing in dll stuffs, can someone enlighten me up? Any help will be appreciated.

回答1:

Your best bet in this case is the Desktop App Converter.

In summary, what that does is takes your existing .exe application and converts it to an Universal Store appx. In most cases this can happen without any code changes, and the resulting app can be deployed to the Windows Store or other UWP deployment channels (MDM solutions). It also lets you add some of the UWP features such as Live Tiles or Push Notifications, while others won't be possible with this (Adaptive Layouts). The application, though running under the new Application Model will still run with the same permissions as the original .exe (not sandboxed).

So, if you are being asked to convert the app for (some of) those reasons, it might be your best solution.

If this does not work for you, there is no other choice than a complete rewrite at this point since UWP does not support Forms, you will need to use XAML, so your entire UI stack needs to be redone at which point, a complete refresh usually makes more sense.