EntityFramework和Xamarin Forms .Net标准2.0程序集加载问题

编程入门 行业动态 更新时间:2024-10-21 17:29:59
本文介绍了EntityFramework和Xamarin Forms .Net标准2.0程序集加载问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

潜在的重复 EF.Core 2.0.1在Xamarin中不安全.Android 除了目标8.0不是7.1之外,而且还加载了dotnet版本2.1.4.

Potential DUPLICATE EF.Core 2.0.1 Unsafe in Xamarin.Android Except targeting 8.0 not 7.1 and dotnet version 2.1.4 is loaded.

使用VS 2017版本15.5.7测试 Xamarin表单中的实体框架 UWP项目.没有Mac来测试IOS版本.

Using VS 2017 version 15.5.7 to test Entity framework in Xamarin forms The UWP project. Dont have a mac to test the IOS version.

droid版本在以下输出中消失 proj.cs文件的关键点是

The droid version dies with the output below The key points from proj.cs file are

<TargetFrameworkVersion>v8.0</TargetFrameworkVersion> <ItemGroup> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite"> <Version>2.0.1</Version> </PackageReference> <PackageReference Include="Xamarin.Forms" Version="2.5.0.280555" /> <PackageReference Include="Xamarin.Android.Support.Design" Version="25.4.0.2" /> <PackageReference Include="Xamarin.Android.Support.v7.AppCompat" Version="25.4.0.2" /> <PackageReference Include="Xamarin.Android.Support.v4" Version="25.4.0.2" /> <PackageReference Include="Xamarin.Android.Support.v7.CardView" Version="25.4.0.2" /> <PackageReference Include="Xamarin.Android.Support.v7.MediaRouter" Version="25.4.0.2" />

03-07 18:19:02.011 D/Mono(5003):装配加载程序探测 位置:"System.Runtime.CompilerServices.Unsafe". 03-07 18:19:02.011 F/monodroid-assembly(5003):无法加载组件 启动注册过程中的"System.Runtime.CompilerServices.Unsafe". 03-07 18:19:02.011 F/monodroid-assembly(5003):这可能是由于 无效的调试安装. 03-07 18:19:02.011 F/monodroid-assembly(5003):常见原因是"adb install" 应用程序,而不是通过IDE进行操作.

03-07 18:19:02.011 D/Mono ( 5003): Assembly Loader probing location: 'System.Runtime.CompilerServices.Unsafe'. 03-07 18:19:02.011 F/monodroid-assembly( 5003): Could not load assembly 'System.Runtime.CompilerServices.Unsafe' during startup registration. 03-07 18:19:02.011 F/monodroid-assembly( 5003): This might be due to an invalid debug installation. 03-07 18:19:02.011 F/monodroid-assembly( 5003): A common cause is to 'adb install' the app directly instead of doing from the IDE.

这个问题仍然没有解决吗? dev com post

Is this issue still not resolved ? dev com post

是否有一个适用于Net standard 2.0和Android 8.0的示例?

Is there a sample that works on Net standard 2.0 and Android 8.0?

推荐答案

我们遇到了同样的问题,它将解决此问题:

We had the same issue, this will resolve it:

  • 转到C:\ Users \您的用户名.nuget \ System.Runtime.Compilerservies.Unsafe \ 4.4.0 \并删除ref文件夹
  • 复制lib文件夹并将其重命名为ref
  • 清理并构建项目

更多推荐

EntityFramework和Xamarin Forms .Net标准2.0程序集加载问题

本文发布于:2023-11-15 05:32:31,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1591585.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:加载   标准   程序   Xamarin   EntityFramework

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!