将.Net dll转换为.Net Core dll [英] Converting a .Net dll to a .Net Core dll

查看:262
本文介绍了将.Net dll转换为.Net Core dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已经用Visual Basic(Windows窗体应用程序)编写了该应用程序,我的任务是将其转换为通用应用程序(UWP)。所述应用程序使用特定于.Net Framework的dll,因此为了将其转换为通用应用程序,我需要有一个针对.Net Core的dll。



有办法吗?



我对dll东西一无所知,有人可以启发我吗?任何帮助将不胜感激。

解决方案

在这种情况下,您最好的选择是桌面应用程序转换器。并将其转换为Universal Store appx。在大多数情况下,无需更改任何代码即可实现此目的,并且可以将生成的应用程序部署到Windows应用商店或其他UWP部署渠道(MDM解决方案)。它还可以让您添加一些UWP功能,例如实时平铺或推送通知,而其他功能则无法使用(自适应布局)。该应用程序虽然在新的应用程序模型下运行,但仍将以与原始.exe相同的权限运行(未沙盒化)。



因此,如果系统要求您出于某些原因而转换应用程序,这可能是您最好的解决方案。



如果这对您不起作用,由于UWP不支持Forms,因此此时除了完全重写之外别无选择,您将需要使用XAML,因此此时需要重做整个UI堆栈,通常更有意义的是进行完全刷新。


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.

解决方案

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.

这篇关于将.Net dll转换为.Net Core dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆