[英].NETcore, UWP - can't install NuGet package
I try to create project using Universal Windows Platform. 我尝试使用通用Windows平台创建项目。 I did a few of them but after download .NET Core i have problem with NuGet Packages.
我做了一些,但是下载.NET Core之后,我遇到了NuGet软件包的问题。 When i try to Install MySql.Data i get
当我尝试安装MySql.Data时,我得到了
Package restore failed.
程序包还原失败。
Output: 输出:
MySql.Data 6.9.9 is not compatible with UAP,Version=v10.0.
Some packages are not compatible with UAP,Version=v10.0.
MySql.Data 6.9.9 is not compatible with UAP,Version=v10.0 (win10-arm).
Some packages are not compatible with UAP,Version=v10.0 (win10-arm).
MySql.Data 6.9.9 is not compatible with UAP,Version=v10.0 (win10-arm-aot).
Some packages are not compatible with UAP,Version=v10.0 (win10-arm-aot).
MySql.Data 6.9.9 is not compatible with UAP,Version=v10.0 (win10-x64).
Some packages are not compatible with UAP,Version=v10.0 (win10-x64).
MySql.Data 6.9.9 is not compatible with UAP,Version=v10.0 (win10-x64-aot).
Some packages are not compatible with UAP,Version=v10.0 (win10-x64-aot).
MySql.Data 6.9.9 is not compatible with UAP,Version=v10.0 (win10-x86).
Some packages are not compatible with UAP,Version=v10.0 (win10-x86).
MySql.Data 6.9.9 is not compatible with UAP,Version=v10.0 (win10-x86-aot)
I read I should update .NET core to version 5.2.2 but it didn't work. 我读过我应该将.NET core更新到版本5.2.2,但是没有用。 I have no idea what should i do.
我不知道该怎么办。 I have also problem with BouncyCastle package but i found Portable-BouncyCastle version.
我也有BouncyCastle软件包问题,但我发现了Portable-BouncyCastle版本。
Here is my project.json 这是我的project.json
{
"dependencies": {
"Microsoft.NETCore.UniversalWindowsPlatform": "5.2.2",
"Portable.BouncyCastle-Signed": "1.7.0.2"
},
"frameworks": {
"uap10.0": {}
},
"runtimes": {
"win10-arm": {},
"win10-arm-aot": {},
"win10-x86": {},
"win10-x86-aot": {},
"win10-x64": {},
"win10-x64-aot": {}
}
}
The problem is caused by the fact that MySql.Data
is not compatible with UWP. 该问题是由于
MySql.Data
与UWP不兼容这一事实引起的。 When you see the Package Manager output, this is stated clearly: 当您看到“程序包管理器”输出时,将明确说明以下内容:
Package MySql.Data 6.9.9 is not compatible with uap10.0 (UAP,Version=v10.0).
Package MySql.Data 6.9.9 supports:
- net40 (.NETFramework,Version=v4.0)
- net45 (.NETFramework,Version=v4.5)
I have found a repo on GitHub , that is apparently trying to take the compatible APIs from the MySql.Data
package so that the app can pass Windows Store certification, but I have not tried it. 我在GitHub上找到了一个仓库 ,显然是在尝试从
MySql.Data
包中获取兼容的API,以便该应用程序可以通过Windows Store认证,但我没有尝试过。
It seems however, that it was possible to install older versions of MySql.Data
(6.9.7) into a UWP project, although it was not possible to publish the app to Store later - see the example here . 但是,似乎不可能将较旧版本的
MySql.Data
(6.9.7)安装到UWP项目中,尽管以后无法将应用程序发布到Store-请参见此处的示例 。
The problem with BouncyCastle
is very analogous, the portable version is compatible with UWP. BouncyCastle
的问题非常类似,便携式版本与UWP兼容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.