Windows UWP-在侧面加载的应用程序中动态加载程序集 [英] Windows UWP - Dynamically Load Assembly In Side Loaded App

查看:80
本文介绍了Windows UWP-在侧面加载的应用程序中动态加载程序集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Windows 10 Store应用程序的故意安全性是不允许在运行时加载程序集。我认为此功能过分夸大,并阻止了UWP开发的发展。但是,如果这是Microsoft的坚实设计决定,那么我们无能为力。

It seems to be a deliberate security of Windows 10 Store apps that assemblies not be allowed to be loaded at runtime. I think that this feature is massive overkill and stops UWP development dead in its tracks. However, if it is a rock solid design decision by Microsoft, there is nothing we can do to argue with it.

相反,我想问一个问题,假设您没有将UWP应用部署到商店,是否仍然无法动态加载程序集?

Instead, I'd like to ask the question, assuming that you were not deploying your UWP app to the store, would it still be impossible to load an assembly dynamically? If it's possible, how?

请查看此功能请求: rel = nofollow noreferrer> https://wpdev.uservoice.com/forums/110705-universal-windows-platform/suggestions/18145291-dynamically-load-assembly

推荐答案

似乎这个问题的答案是否定的。

It seems as though the answer to this question is no.

游戏的UWP已更改。 UWP是一个旨在将应用程序引入商店的平台。这是一个精简的平台,似乎不允许您在运行时加载程序集。

The game has changed in UWP. UWP is a platform which is geared toward getting apps in to the store. It's a stripped down platform and doesn't appear to allow you to load assemblies at runtime. This was possible in .NET.

但是,似乎确实存在一种使用Desktop Bridge在.NET运行时之上运行UWP样式的应用程序的方法。我不太熟悉它,但是您可以在这里阅读更多内容,以此作为起点。我的猜测是,如果要动态加载程序集,最好的方法是使用此方法:
https://docs.microsoft.com/zh-cn/windows/uwp/porting/desktop-to-uwp-root

However, there does seem to be a way to run UWP style apps on top of the .NET runtime using the Desktop Bridge. I'm not really that familiar with it, but you can read more here as a starting my point. My guess is that if you want to load assemblies dynamically, the best approach would be to use this: https://docs.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-root

这篇关于Windows UWP-在侧面加载的应用程序中动态加载程序集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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