{"action":"created","issue":{"url":"https://api.github.com/repos/moq/moq4/issues/566","repository_url":"https://api.github.com/repos/moq/moq4","labels_url":"https://api.github.com/repos/moq/moq4/issues/566/labels{/name}","comments_url":"https://api.github.com/repos/moq/moq4/issues/566/comments","events_url":"https://api.github.com/repos/moq/moq4/issues/566/events","html_url":"https://github.com/moq/moq4/issues/566","id":285676097,"number":566,"title":"MissingMethodException / \"Method not found\" after update to Moq 4.8.0","user":{"login":"JHotterbeekxBannerconnect","id":20039080,"avatar_url":"https://avatars0.githubusercontent.com/u/20039080?v=4","gravatar_id":"","url":"https://api.github.com/users/JHotterbeekxBannerconnect","html_url":"https://github.com/JHotterbeekxBannerconnect","followers_url":"https://api.github.com/users/JHotterbeekxBannerconnect/followers","following_url":"https://api.github.com/users/JHotterbeekxBannerconnect/following{/other_user}","gists_url":"https://api.github.com/users/JHotterbeekxBannerconnect/gists{/gist_id}","starred_url":"https://api.github.com/users/JHotterbeekxBannerconnect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JHotterbeekxBannerconnect/subscriptions","organizations_url":"https://api.github.com/users/JHotterbeekxBannerconnect/orgs","repos_url":"https://api.github.com/users/JHotterbeekxBannerconnect/repos","events_url":"https://api.github.com/users/JHotterbeekxBannerconnect/events{/privacy}","received_events_url":"https://api.github.com/users/JHotterbeekxBannerconnect/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"stakx","id":104481,"avatar_url":"https://avatars1.githubusercontent.com/u/104481?v=4","gravatar_id":"","url":"https://api.github.com/users/stakx","html_url":"https://github.com/stakx","followers_url":"https://api.github.com/users/stakx/followers","following_url":"https://api.github.com/users/stakx/following{/other_user}","gists_url":"https://api.github.com/users/stakx/gists{/gist_id}","starred_url":"https://api.github.com/users/stakx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stakx/subscriptions","organizations_url":"https://api.github.com/users/stakx/orgs","repos_url":"https://api.github.com/users/stakx/repos","events_url":"https://api.github.com/users/stakx/events{/privacy}","received_events_url":"https://api.github.com/users/stakx/received_events","type":"User","site_admin":false},"assignees":[{"login":"stakx","id":104481,"avatar_url":"https://avatars1.githubusercontent.com/u/104481?v=4","gravatar_id":"","url":"https://api.github.com/users/stakx","html_url":"https://github.com/stakx","followers_url":"https://api.github.com/users/stakx/followers","following_url":"https://api.github.com/users/stakx/following{/other_user}","gists_url":"https://api.github.com/users/stakx/gists{/gist_id}","starred_url":"https://api.github.com/users/stakx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stakx/subscriptions","organizations_url":"https://api.github.com/users/stakx/orgs","repos_url":"https://api.github.com/users/stakx/repos","events_url":"https://api.github.com/users/stakx/events{/privacy}","received_events_url":"https://api.github.com/users/stakx/received_events","type":"User","site_admin":false}],"milestone":null,"comments":46,"created_at":"2018-01-03T12:41:56Z","updated_at":"2018-03-19T19:33:56Z","closed_at":"2018-01-17T12:40:46Z","author_association":"NONE","body":"Hi,\r\n\r\nToday I've tried updating the NuGet package from 4.7.145.0 to 4.8.0.0 and I'm running into an issue with a specific test case failing now on a strange error message. To give you some context, in our tests we create a HttpActionContext to test our authentication. This is native .net functionality. I've isolated the issue to the following code:\r\n\r\n\r\n    [Test]\r\n    public void OnActionExecuting_ShouldFillMarketInSession() {\r\n      var fakeActionContext = _CreateFakeHttpActionContext();\r\n    }\r\n\r\n    private HttpActionContext _CreateFakeHttpActionContext() {\r\n      return new HttpActionContext(null, new ReflectedHttpActionDescriptor()) {\r\n        Response = new HttpResponseMessage(HttpStatusCode.OK)\r\n      };\r\n    }\r\n\r\nWhen running this test, it fails with the following error:\r\n\r\n> System.MissingMethodException : Method not found: 'Void System.Web.Http.Controllers.HttpActionContext.set_Response(System.Net.Http.HttpResponseMessage)'.\r\n   at SMP.Api.Test.Filter.MoqTest._CreateFakeHttpActionContext()\r\n   at SMP.Api.Test.Filter.MoqTest.OnActionExecuting_ShouldFillMarketInSession() in C:\\Projects\\Athena\\Athena\\SMP.Api.Test\\Filter\\MoqTest.cs:line 14\r\n\r\nCould you help me figure out what is wrong, or fix this if it is an actual bug?\r\n\r\nThanks,\r\nJohn"},"comment":{"url":"https://api.github.com/repos/moq/moq4/issues/comments/374340936","html_url":"https://github.com/moq/moq4/issues/566#issuecomment-374340936","issue_url":"https://api.github.com/repos/moq/moq4/issues/566","id":374340936,"user":{"login":"ManfredLange","id":1130812,"avatar_url":"https://avatars2.githubusercontent.com/u/1130812?v=4","gravatar_id":"","url":"https://api.github.com/users/ManfredLange","html_url":"https://github.com/ManfredLange","followers_url":"https://api.github.com/users/ManfredLange/followers","following_url":"https://api.github.com/users/ManfredLange/following{/other_user}","gists_url":"https://api.github.com/users/ManfredLange/gists{/gist_id}","starred_url":"https://api.github.com/users/ManfredLange/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManfredLange/subscriptions","organizations_url":"https://api.github.com/users/ManfredLange/orgs","repos_url":"https://api.github.com/users/ManfredLange/repos","events_url":"https://api.github.com/users/ManfredLange/events{/privacy}","received_events_url":"https://api.github.com/users/ManfredLange/received_events","type":"User","site_admin":false},"created_at":"2018-03-19T19:33:56Z","updated_at":"2018-03-19T19:33:56Z","author_association":"NONE","body":"@rhyous Thank you for the suggestion. We found a work around. We were using Moq to mock HttpResponseBase, HttpRequestBase and HttpContextBase. We now have our own explicit mocks in place for these. We have almost 60 projects in our solution so going back and forth between different versions of 3rd party libraries has its limitations both technically and time wise. We appreciate that it seems to a be an issue within dotnet and unrelated to Moq. In our case it appeared when we upgraded Moq. We acknowledge that it's not caused by Moq.\r\n\r\nWe continue to use Moq for almost all our mocking needs, so please keep up the excellent work on this project. Thank you!"}}
{"actor":{"display_login":"ManfredLange"}}