我有一个.NetStandard 1.4库,它引用了另一个Xamarin.Forms .NetStandard 1.4库。
第一图书馆:
{
"supports": {},
"dependencies": {
"Microsoft.NETCore.Portable.Compatibility": "1.0.2",
"NETStandard.Library": "1.6.1",
"Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.1.1"
"AutoMapper": "6.0.2",
"Microsoft.AspNetCore.DataProtection": "1.1.1",
"Microsoft.EntityFrameworkCore": "1.1.1",
"System.Xml.XmlDocument": "4.3.0"
},
"frameworks": {
"netstandard1.4": {}
}
}Xamarin.Forms图书馆:
{
"supports": {},
"dependencies": {
"Microsoft.NETCore.Portable.Compatibility": "1.0.2",
"NETStandard.Library": "1.6.1",
"Xamarin.Forms": "2.3.4.231",
"Xamarin.Forms.CarouselView": "2.3.0-pre2"
},
"frameworks": {
"netstandard1.4": {
"imports": "portable-net461"
}
}
}IOS运行得很好。Android在添加了一些软件包后也运行良好。我的问题是UWP。简直快让我疯了。这是UWP project.json:
{
"dependencies": {
"Microsoft.NETCore.UniversalWindowsPlatform": "5.3.2",
"Xamarin.Forms": "2.3.4.231",
"Xamarin.Forms.CarouselView": "2.3.0-pre2"
},
"frameworks": {
"uap10.0": {}
},
"runtimes": {
"win10-x86": {}
}
} 我有4个错误:
无效的Resx文件。流不是有效的资源文件。Eella.Xamarin.Taxi.UWP C:\Users.....nuget\packages\Microsoft.AspNetCore.DataProtection.Abstractions\1.1.1\lib\netstandard1.3\Microsoft.AspNetCore.DataProtection.Abstractions.dll
。
无效的Resx文件。流不是有效的资源文件。Eella.Xamarin.Taxi.UWP C:\Users....nuget\packages\Microsoft.AspNetCore.WebUtilities\1.1.1\lib\netstandard1.3\Microsoft.AspNetCore.WebUtilities.dll
。
一个或多个包与UAP、Version=v10.0 (win10-x86)不兼容。
。
Win32.Registry4.3.0在UAP,Version=v10.0上为Microsoft.Win32.Registry提供了编译时参考程序集,但是没有与win10-x86兼容的运行时程序集。
我能做些什么?
更新
在降级这两个包之后,我的问题得到了解决,并成功地部署了应用程序:
"Microsoft.AspNetCore.DataProtection":1.0.2
"Microsoft.EntityFrameworkCore":1.0.2
发布于 2017-04-15 01:46:10
这里有两件事可能会发生。首先,我会将“进口”行更改为
"imports": "portable-net45+win8+wpa81"这使得它与Profile259兼容。第二,由于win10-x86或其任何变体,我通常很难将软件包添加到我的UWP项目中。
转到您的UWP项目中的project.json文件,并删除所有运行时条目,这样您就可以继续使用它了。
{
"dependencies": {
"Microsoft.NETCore.UniversalWindowsPlatform": "5.3.2",
"Xamarin.Forms": "2.3.4.231",
"Xamarin.Forms.CarouselView": "2.3.0-pre2"
},
"frameworks": {
"uap10.0": {}
},
"runtimes": {
}
} 现在加入你的包裹。应该管用的。现在,添加运行时条目,您的项目应该仍然运行得很好。
https://stackoverflow.com/questions/43417436
复制相似问题