C# P/使用SQLite构建UWP应用程序时调用警告
在构建添加了SQLite的UWP应用程序时,我收到了大约40条警告,如下所示(只是方法名称发生了变化)(添加了一些新行以提高可读性)。配置设置为释放。我在调试模式下没有收到任何这些消息C# P/使用SQLite构建UWP应用程序时调用警告,c#,sqlite,win-universal-app,uwp,windows-10-universal,C#,Sqlite,Win Universal App,Uwp,Windows 10 Universal,在构建添加了SQLite的UWP应用程序时,我收到了大约40条警告,如下所示(只是方法名称发生了变化)(添加了一些新行以提高可读性)。配置设置为释放。我在调试模式下没有收到任何这些消息 C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\ARM\ilc\IlcInternals.targets(936,5): warning : ILTransform_0000: MCG : warning MCG0006:
C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\ARM\ilc\IlcInternals.targets(936,5):
warning : ILTransform_0000:
MCG : warning MCG0006:
Unresolved P/Invoke method 'Open!sqlite3' in assembly
'SQLite.Net.Platform.WinRT, Version=3.1.0.0, Culture=neutral, PublicKeyToken=null'
because it is not available in UWP applications. Please either use an another API ,
or use [DllImport(ExactSpelling=true) to indicate that you understand the
implications of using non-UWP application APIs.
根据许多教程,我在项目中有以下参考资料
- 通过SQLite-uwp-3120200.vsix文件安装的用于Windows通用平台的SQLite
(v3.1.1)通过NuGet安装SQLite.Net PCL
有人知道这个警告消息的含义和解决方法吗?我在处理UWP unittest时遇到了类似的问题-调试模式下没有问题,只有在发布模式下才有问题 我通过将UseDotNetNativeToolchain更改为false解决了这个问题 查看您的.vcxproj文件
false
你能解决这个问题吗?@AjS不幸不能。但我已经有一段时间没有研究这个问题了。