gpt4 book ai didi

xamarin - 引用 PCL 配置文件 111 是 PCL .NET 标准 1.1

转载 作者:行者123 更新时间:2023-12-04 00:37:05 28 4
gpt4 key购买 nike

在 .NET 标准 PCL 项目中,我想引用一个针对配置文件 111 (lib\portable-win8+net45+wpa81+MonoAndroid+Xamarin.iOS10) 的私有(private) nuget 包

但是当我添加 nuget 包时,nuget 提示 nuget 包不包含与 netstandard 1.1 兼容的目标。虽然文档 https://learn.microsoft.com/fr-fr/dotnet/articles/standard/library说明profile 111兼容netstandard 1.1,如果引用了Microsoft.NETCore.Portable.Compatibility包就可以引用了,是这样的。

知道哪里出了问题吗?我可以更新自定义 nuget 包,但不知道要更改什么。

最佳答案

project.json 文件中,尝试为特定的 PCL 配置文件添加 imports 指令。像这样,

"frameworks": {
"netstandard1.1": {
"imports": "portable-win8+net45+wpa81"
}
}

此外,为了获得最大的兼容性,我认为您应该放弃 NuGet 包的 MonoAndroidXamarin.iOS10 规范。包管理器应该能够自行确定 Xamarin 适用性。

可以找到关于imports 指令的更多信息here .

关于xamarin - 引用 PCL 配置文件 111 是 PCL .NET 标准 1.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39954351/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com