使用.net native编译时,Entity Framework Core 1.1崩溃

时间:2016-12-14 14:47:12

标签: entity-framework uwp

我有一个使用Entite Framework Core 1.1和SQLite的UWP应用程序。当我在调试模式下运行应用程序时一切正常。但是当我使用.net native编译为发布时,它会以Null指针崩溃。 在输出上我得到了这个:

Exception thrown: 'SQLite.SQLiteException' in SQLite-net.dll
Exception thrown: 'System.ArgumentNullException' in System.Linq.Expressions.dll
Exception thrown: 'System.ArgumentNullException' in System.Private.CoreLib.dll
An exception of type 'System.ArgumentNullException' occurred in System.Private.CoreLib.dll but was not handled in user code
Additional information: ArgumentNull_Generic

enter image description here

我在GitHub上看到了在ARM设备上有类似内容的问题,但我在所有设备上都有它,包括我的笔记本电脑。我尝试将条目设置为rd.xaml以解决GitHub问题中建议的问题。但是我用它做的条目也不起作用:

<Assembly Name="Microsoft.EntityFrameworkCore.Sqlite" DoNotOptimize="true" DoNotInline="true" />

我使用这些包:

    "Microsoft.EntityFrameworkCore.Sqlite": "1.1.0",
    "Microsoft.EntityFrameworkCore.Tools": "1.1.0-preview4-final",

1 个答案:

答案 0 :(得分:0)

带有UWP的EF Core尚未准备好迎接黄金时段..

来自:https://github.com/aspnet/EntityFramework/wiki/Roadmap

&#34;通用Windows平台(UWP)目前适用于本地开发,但是EF和.NET Native团队正在努力解决的.NET Native工具链存在问题。&#34;