我想建立一个控制台应用程序,它使用Microsoft.AspNet.SignalR.Client。然而,似乎SignalR.Client在netcoreapp1.1的nuget上不可用:
Package Microsoft.AspNet.SignalR.Client 2.2.1 is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Package Microsoft.AspNet.SignalR.Client 2.2.1 supports:
- net40 (.NETFramework,Version=v4.0)
- net45 (.NETFramework,Version=v4.5)
- netcore50 (.NETCore,Version=v5.0)
- portable-net45+sl5+win8+wp8+wpa81(.NETPortable,Version=v0.0,Profile=Profile344)
- portable-win81+wpa81 (.NETPortable,Version=v0.0,Profile=Profile32)
One or more packages are incompatible with .NETCoreApp,Version=v1.1.我想让我的应用程序尽可能的开放/可移植(我不分发编译过的二进制文件,只分发源代码供其他人使用)。我如何更改下面的project.json,这样我就可以编译和运行应用程序(可能使用netcore50):
{
"version": "1.0.0-*",
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true
},
"dependencies": {
"Newtonsoft.Json": "*",
"Microsoft.AspNet.SignalR.Client": "*"
},
"frameworks": {
"netcoreapp1.1": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.1.0"
}
},
"imports": "dnxcore50"
}
}
}提前谢谢你。
发布于 2017-01-14 20:05:24
您可以在.net核心应用1.1中使用netcore50,如下所示。更新了project.json-
{
"version": "1.0.0-*",
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true
},
"dependencies": {
"Newtonsoft.Json": "*",
"Microsoft.AspNet.SignalR.Client": "2.2.1"
},
"frameworks": {
"netcoreapp1.1": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.1.0"
}
},
"imports": "netcore50"
}
}
}https://stackoverflow.com/questions/41647934
复制相似问题