{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/SignalR/issues/2008","repository_url":"https://api.github.com/repos/aspnet/SignalR","labels_url":"https://api.github.com/repos/aspnet/SignalR/issues/2008/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/SignalR/issues/2008/comments","events_url":"https://api.github.com/repos/aspnet/SignalR/issues/2008/events","html_url":"https://github.com/aspnet/SignalR/issues/2008","id":314231286,"number":2008,"title":"WinForms net461/471 with SignalR.Client throws on Connect","user":{"login":"HaoK","id":6537861,"avatar_url":"https://avatars2.githubusercontent.com/u/6537861?v=4","gravatar_id":"","url":"https://api.github.com/users/HaoK","html_url":"https://github.com/HaoK","followers_url":"https://api.github.com/users/HaoK/followers","following_url":"https://api.github.com/users/HaoK/following{/other_user}","gists_url":"https://api.github.com/users/HaoK/gists{/gist_id}","starred_url":"https://api.github.com/users/HaoK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HaoK/subscriptions","organizations_url":"https://api.github.com/users/HaoK/orgs","repos_url":"https://api.github.com/users/HaoK/repos","events_url":"https://api.github.com/users/HaoK/events{/privacy}","received_events_url":"https://api.github.com/users/HaoK/received_events","type":"User","site_admin":false},"labels":[{"id":903822533,"url":"https://api.github.com/repos/aspnet/SignalR/labels/shiproom-approved","name":"shiproom-approved","color":"77c631","default":false}],"state":"open","locked":false,"assignee":{"login":"anurse","id":7574,"avatar_url":"https://avatars3.githubusercontent.com/u/7574?v=4","gravatar_id":"","url":"https://api.github.com/users/anurse","html_url":"https://github.com/anurse","followers_url":"https://api.github.com/users/anurse/followers","following_url":"https://api.github.com/users/anurse/following{/other_user}","gists_url":"https://api.github.com/users/anurse/gists{/gist_id}","starred_url":"https://api.github.com/users/anurse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anurse/subscriptions","organizations_url":"https://api.github.com/users/anurse/orgs","repos_url":"https://api.github.com/users/anurse/repos","events_url":"https://api.github.com/users/anurse/events{/privacy}","received_events_url":"https://api.github.com/users/anurse/received_events","type":"User","site_admin":false},"assignees":[{"login":"anurse","id":7574,"avatar_url":"https://avatars3.githubusercontent.com/u/7574?v=4","gravatar_id":"","url":"https://api.github.com/users/anurse","html_url":"https://github.com/anurse","followers_url":"https://api.github.com/users/anurse/followers","following_url":"https://api.github.com/users/anurse/following{/other_user}","gists_url":"https://api.github.com/users/anurse/gists{/gist_id}","starred_url":"https://api.github.com/users/anurse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anurse/subscriptions","organizations_url":"https://api.github.com/users/anurse/orgs","repos_url":"https://api.github.com/users/anurse/repos","events_url":"https://api.github.com/users/anurse/events{/privacy}","received_events_url":"https://api.github.com/users/anurse/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/aspnet/SignalR/milestones/10","html_url":"https://github.com/aspnet/SignalR/milestone/10","labels_url":"https://api.github.com/repos/aspnet/SignalR/milestones/10/labels","id":3194471,"number":10,"title":"2.1.0-rc1","description":"","creator":{"login":"anurse","id":7574,"avatar_url":"https://avatars3.githubusercontent.com/u/7574?v=4","gravatar_id":"","url":"https://api.github.com/users/anurse","html_url":"https://github.com/anurse","followers_url":"https://api.github.com/users/anurse/followers","following_url":"https://api.github.com/users/anurse/following{/other_user}","gists_url":"https://api.github.com/users/anurse/gists{/gist_id}","starred_url":"https://api.github.com/users/anurse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anurse/subscriptions","organizations_url":"https://api.github.com/users/anurse/orgs","repos_url":"https://api.github.com/users/anurse/repos","events_url":"https://api.github.com/users/anurse/events{/privacy}","received_events_url":"https://api.github.com/users/anurse/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":85,"state":"open","created_at":"2018-03-16T21:12:10Z","updated_at":"2018-04-16T18:37:41Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2018-04-13T19:53:25Z","updated_at":"2018-04-16T19:35:38Z","closed_at":null,"author_association":"MEMBER","body":"Using 2.1-preview2 fina lbits:\r\n \r\nSetup SignalR server with /hub/chat via: https://blogs.msdn.microsoft.com/webdev/2018/02/27/asp-net-core-2-1-0-preview1-getting-started-with-signalr/\r\nThis is working via chrome at https://localhost:44343/hubs/chat\r\n\r\n\r\nSetup WinForms client:\r\n```\r\n•\tNew WinForms project (net461) + Add preview2 SignalR.Client\r\n•\t  <package id=\"Microsoft.AspNetCore.Connections.Abstractions\" version=\"2.1.0-preview2-final\" targetFramework=\"net461\" />\r\n•\t  <package id=\"Microsoft.AspNetCore.Http.Connections.Client\" version=\"1.0.0-preview2-final\" targetFramework=\"net461\" />\r\n•\t  <package id=\"Microsoft.AspNetCore.Http.Connections.Common\" version=\"1.0.0-preview2-final\" targetFramework=\"net461\" />\r\n•\t  <package id=\"Microsoft.AspNetCore.Http.Features\" version=\"2.1.0-preview2-final\" targetFramework=\"net461\" />\r\n•\t  <package id=\"Microsoft.AspNetCore.SignalR.Client\" version=\"1.0.0-preview2-final\" targetFramework=\"net461\" />\r\n•\t  <package id=\"Microsoft.AspNetCore.SignalR.Client.Core\" version=\"1.0.0-preview2-final\" targetFramework=\"net461\" />\r\n•\t  <package id=\"Microsoft.AspNetCore.SignalR.Common\" version=\"1.0.0-preview2-final\" targetFramework=\"net461\" />\r\n•\t  <package id=\"Microsoft.Extensions.Configuration\" version=\"2.1.0-preview2-final\" targetFramework=\"net461\" />\r\n```\r\n\r\nTrying to connect via:\r\n\r\n``` \r\n        const string ServerURI = \"https://localhost:44343/hubs/chat\";\r\n            Console.WriteLine(\"Connecting to {0}\", ServerURI);\r\n \r\n            Connection = new HubConnectionBuilder().WithUrl(ServerURI).Build();\r\n            Connection.Closed += Connection_Closed;\r\n            Connection.On<string, string>(\"AddMessage\", (name, message) =>\r\n                this.Invoke((Action)(() =>\r\n                    RichTextBoxConsole.AppendText(String.Format(\"{0}: {1}\" + Environment.NewLine, name, message))\r\n                ))\r\n            );\r\n            try\r\n            {\r\n                await Connection.StartAsync(); => Blows up with: \r\n ```\r\n\r\n```\r\nSystem.IO.FileNotFoundException: Could not load file or assembly 'System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.\r\nFile name: 'System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'\r\n   at System.SpanHelpers.IndexOf(Byte& searchSpace, Byte value, Int32 length)\r\n   at System.MemoryExtensions.IndexOf[T](ReadOnlySpan`1 span, T value)\r\n   at System.Buffers.BuffersExtensions.PositionOf[T](ReadOnlySequence`1& source, T value)\r\n   at Microsoft.AspNetCore.SignalR.Internal.Formatters.TextMessageParser.TryParseMessage(ReadOnlySequence`1& buffer, ReadOnlySequence`1& payload)\r\n   at Microsoft.AspNetCore.SignalR.Internal.Protocol.HandshakeProtocol.TryParseResponseMessage(ReadOnlySequence`1& buffer, HandshakeResponseMessage& responseMessage)\r\n   at Microsoft.AspNetCore.SignalR.Client.HubConnection.<HandshakeAsync>d__38.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.AspNetCore.SignalR.Client.HubConnection.<StartAsyncCore>d__25.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at Microsoft.AspNetCore.SignalR.Client.HubConnection.<StartAsyncCore>d__25.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.AspNetCore.SignalR.Client.HubConnection.<StartAsync>d__18.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n```"},"comment":{"url":"https://api.github.com/repos/aspnet/SignalR/issues/comments/381723077","html_url":"https://github.com/aspnet/SignalR/issues/2008#issuecomment-381723077","issue_url":"https://api.github.com/repos/aspnet/SignalR/issues/2008","id":381723077,"user":{"login":"anurse","id":7574,"avatar_url":"https://avatars3.githubusercontent.com/u/7574?v=4","gravatar_id":"","url":"https://api.github.com/users/anurse","html_url":"https://github.com/anurse","followers_url":"https://api.github.com/users/anurse/followers","following_url":"https://api.github.com/users/anurse/following{/other_user}","gists_url":"https://api.github.com/users/anurse/gists{/gist_id}","starred_url":"https://api.github.com/users/anurse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anurse/subscriptions","organizations_url":"https://api.github.com/users/anurse/orgs","repos_url":"https://api.github.com/users/anurse/repos","events_url":"https://api.github.com/users/anurse/events{/privacy}","received_events_url":"https://api.github.com/users/anurse/received_events","type":"User","site_admin":false},"created_at":"2018-04-16T19:35:37Z","updated_at":"2018-04-16T19:35:37Z","author_association":"MEMBER","body":"I believe this is cause by the fact that System.Memory depends on the following for `net45` (see https://dotnet.myget.org/feed/dotnet-core/package/nuget/System.Memory). We are building for `net461` in the sample, but the `net45` dependencies are chosen over the `netstandard2.0` ones because NuGet finds an exact target framework name match (**unless this logic has changed since I last knew how this worked ;)**).\r\n\r\n* System.Buffers (>= 4.4.0)\r\n* System.Runtime.CompilerServices.Unsafe (>= 4.5.0-preview3-26416-06)\r\n\r\nHowever, at runtime, it only provides a `netstandard2.0` binary, so it loads that binary, which references `System.Numerics.Vectors`, and thus blows up. System.Memory's references:\r\n\r\n```\r\n// netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51\r\n// System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\r\n// System.Runtime.CompilerServices.Unsafe, Version=4.0.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\r\n// System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51\r\n// mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\r\n```"}}
{"actor":{"display_login":"anurse"}}