{"action":"opened","issue":{"url":"https://api.github.com/repos/aspnet/Hosting/issues/1282","repository_url":"https://api.github.com/repos/aspnet/Hosting","labels_url":"https://api.github.com/repos/aspnet/Hosting/issues/1282/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Hosting/issues/1282/comments","events_url":"https://api.github.com/repos/aspnet/Hosting/issues/1282/events","html_url":"https://github.com/aspnet/Hosting/issues/1282","id":276614858,"number":1282,"title":"TestHost vs Kestrel differences","user":{"login":"kimbell","id":11733077,"avatar_url":"https://avatars0.githubusercontent.com/u/11733077?v=4","gravatar_id":"","url":"https://api.github.com/users/kimbell","html_url":"https://github.com/kimbell","followers_url":"https://api.github.com/users/kimbell/followers","following_url":"https://api.github.com/users/kimbell/following{/other_user}","gists_url":"https://api.github.com/users/kimbell/gists{/gist_id}","starred_url":"https://api.github.com/users/kimbell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kimbell/subscriptions","organizations_url":"https://api.github.com/users/kimbell/orgs","repos_url":"https://api.github.com/users/kimbell/repos","events_url":"https://api.github.com/users/kimbell/events{/privacy}","received_events_url":"https://api.github.com/users/kimbell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-11-24T13:19:02Z","updated_at":"2017-11-24T13:19:02Z","closed_at":null,"author_association":"NONE","body":"I have some ASP.NET Core 1.1 code that I'm upgrading to 2.0. During this process I encountered a problem with my middleware. It was using IOptionsSnapshot from the constructor. This ends up with a \r\n'Cannot consume scoped service 'Microsoft.Extensions.Options.IOptionsSnapshot' based error. \r\n\r\nI got this error when running from Visual Studio. \r\n\r\nI also have tests for my code, so I updated them to cover both 1.1 and 2.0. In this code I'm using TestHost. I was hoping the tests for 2.0 would crash the same way as Kestrel, but all my tests are green.\r\n\r\nIs this constraint verified in the TestHost? Should it be? "}}
{"actor":{"display_login":"kimbell"}}