Xamarin表格.NETSTANDARD 1.4资源问题



我已经将我的PCL项目从经典Xamarin表单转换为.netstandard 1.4我有资源(*。resx)

有问题

错误CS0103当前的名称"资源"不存在 context prog1utility d: myprojects pro1 pro1utilities webutility apiservice.cs 38 Active

我该如何修复?

project.json

{
  "supports": {},
  "dependencies": {
    "Newtonsoft.Json": "9.0.1",
    "System.Net.Http": "4.3.0",
    "Xam.Plugin.Connectivity": "2.2.12",
    "Xamarin.Forms": "2.3.3.168"
  },
  "frameworks": {
    "netstandard1.4": {
      "imports": "portable-win+net45+wp8+win81+wpa8"
    }
  }
}

要使.Resx起作用,您需要添加microsoft.netcore.portable.compatible.compatibility nuget软件包。但是,此后构建还有其他问题。这已经是一个众所周知的问题,而Microsoft的人们正在对此进行工作。一旦我有任何更新,我将更新此帖子。

update(16年12月)

截至目前,根据Microsoft支持,Xamarin与.NET标准并不完全兼容。如果有人证明我错了,我会很高兴的。

update(Mar '17)

这个问题似乎在Visual Studio 2017中消失了。

在进口中使用dnxcore50根据我到目前为止的经验提供了最好的API支持。尝试。

"frameworks": {
    "netstandard1.5": {
      "imports": "dnxcore50"
    }
  }

最新更新