asp.net-core - ASP.NET CORE MVC 可以托管在 Xamarin App(Android) 中吗?

标签 asp.net-core xamarin .net-core

我有一个 ASP.NET 核心 MVC (.NET 核心 3.1) 应用程序在 Kestrel 上运行良好在 Windows 中,现在我想知道是否可以通过 Xamarin 将其迁移到 Android?

此举的目的是降低Android设备的成本。

我注意到:Run ASP.NET Core 3.0 apps with MonoVM
但似乎没有细节?

最佳答案

不,还没有(2021 年 1 月)。
Xamarin、NetFramework、Net5、NetCore3 都支持 NetStandard。 AspNetCore 基于 NetCore,而不是 NetStandard。如果 AspNetCore 是一个 NetStandard 库,它会支持它,但 AspNetCore 使用 NetCore 中 Xamarin 上不存在的其他库。
顺便说一句,如果您只需要一个像 Kestrel 这样在 android 上运行的简单 Web 服务器,您可以使用 EmdedIO。实际上它不支持 MVC、MVP 和 MVVM,因此您不能在 Xamarin 上运行 AspNetCore 应用程序:
https://github.com/unosquare/embedio

关于asp.net-core - ASP.NET CORE MVC 可以托管在 Xamarin App(Android) 中吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61997698/

相关文章:

linux - Linux 下带 dotnet 核心的 LDAP

linux - Linux docker:System.Security.Authentication.AuthenticationException:根据验证过程,远程证书无效

c# - 需要从 IEnumerable<item> 获取 id

asp.net-core - 将身份移至类库 ASP.Net Core

c# - Xamarin.Android SQLite SQLiteConnection.Insert 不返回插入对象的 ID

c# - Xamarin Forms中如何实现CrossPushNotification插件?

c# - 有没有办法从 SQL Server 获取大量 JSON?

c# - 当 url 的一部分已经是另一个路由时,ASP.NET Core 3.1 中的动态路由

macos - 在 mono 上使用 Profiler 收集代码覆盖率信息不包括测试的 dll 的程序集

c# - 如何将参数添加到 .Net Core 结构化日志记录而不在消息中引用它?