我正在编写一个针对这些框架的.NET Core库:
"frameworks": {
"netstandard1.3": {},
"uap10.0": {
"buildOptions": { "define": [ "UWP" ] }
}
}
但是,我无法声明以下内容(编译器错误" Windows namepspace&#34中不存在网络连接):
#if UWP
using Windows.Networking;
Windows.Networking适用于我的UWP应用程序,但我无法在多目标.NET Core库中实现相同功能。添加Microsoft.NETCore.UniversalWindowsPlatform依赖项不会改变任何内容:
"frameworks": {
"netstandard1.3": {},
"uap10.0": {
"dependencies": { "Microsoft.NETCore.UniversalWindowsPlatform": "5.2.2" },
"buildOptions": { "define": [ "UWP" ] }
}
}
我错过了什么?