I got the following errors when I tried to install Dapper.net 1.50.2 to a UWP 5.2.2 app via NuGet 3.5.0 in Visual Studio 2015 update 3. Anyone knows why and how to fix it?
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
The following is the project.json
{
"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": {}
}
}
If you don't need to execute a query and map it to a list of dynamic objects, you can use Entity framework 7 in UWP apps.
I'm afraid that Dapper.Net is now not available for UWP apps, UWP apps use COM as a base, not all libs based on .Net can be used in UWP apps. You can try to wrapper this into a WCF service and get value from this service, or you can try to create a portable library(Class Library (Portable)) which implement this lib for your app.
Or you can try to use web API/service to solve your problem, for example you can submit your data to the web API, web API uses dapper to get data from your database and pass it back to your app.