首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法将Dapper.net 1.50.2安装到UWP 5.2.2应用程序

无法将Dapper.net 1.50.2安装到UWP 5.2.2应用程序
EN

Stack Overflow用户
提问于 2016-09-09 12:04:14
回答 1查看 510关注 0票数 0

当我试图通过Visual Studio2015更新3中的NuGet 3.5.0将Dapper.net 1.50.2安装到UWP5.2.2应用程序时,我得到了以下错误。有人知道为什么和如何修复它吗?

代码语言:javascript
复制
Restoring packages for 'UI'.
Restoring packages for C:\Projects\2016\UWP\UI\project.json...
System.Reflection.Emit.Lightweight 4.0.1 provides a compile-time reference assembly for System.Reflection.Emit.Lightweight on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-arm-aot.
System.Reflection.Emit.ILGeneration 4.0.1 provides a compile-time reference assembly for System.Reflection.Emit.ILGeneration on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-arm-aot.
One or more packages are incompatible with UAP,Version=v10.0 (win10-arm-aot).
System.Reflection.Emit.Lightweight 4.0.1 provides a compile-time reference assembly for System.Reflection.Emit.Lightweight on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x64-aot.
System.Reflection.Emit.ILGeneration 4.0.1 provides a compile-time reference assembly for System.Reflection.Emit.ILGeneration on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x64-aot.
One or more packages are incompatible with UAP,Version=v10.0 (win10-x64-aot).
System.Reflection.Emit.Lightweight 4.0.1 provides a compile-time reference assembly for System.Reflection.Emit.Lightweight on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x86-aot.
System.Reflection.Emit.ILGeneration 4.0.1 provides a compile-time reference assembly for System.Reflection.Emit.ILGeneration on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x86-aot.
One or more packages are incompatible with UAP,Version=v10.0 (win10-x86-aot).
Package restore failed for 'CadWeb.UI'.
Package restore failed. Rolling back package changes for 'UI'.
========== Finished ==========
Time Elapsed: 00:00:02.5165403

以下是project.json

代码语言:javascript
复制
{
  "dependencies": {
    "Microsoft.NETCore.UniversalWindowsPlatform": "5.2.2"
  },
  "frameworks": {
    "uap10.0": {}
  },
  "runtimes": {
    "win10-arm": {},
    "win10-arm-aot": {},
    "win10-x86": {},
    "win10-x86-aot": {},
    "win10-x64": {},
    "win10-x64-aot": {}
  }
}
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-09-12 18:10:23

如果您不需要执行查询并将其映射到动态对象列表,则可以在UWP应用程序中使用Entity framework 7

恐怕Dapper.Net现在不能用于UWP应用程序,UWP应用程序使用COM作为基础,并不是所有基于.Net的库都可以在UWP应用程序中使用。您可以尝试将其封装到WCF服务中并从该服务中获取值,或者您可以尝试创建一个可移植的库(类库( portable ))来为您的应用程序实现此库。

或者您可以尝试使用web API /服务来解决您的问题,例如,您可以将数据提交到web API,web API使用dapper从您的数据库获取数据并将其传递回您的应用程序。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39403691

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档