{"action":"created","issue":{"url":"https://api.github.com/repos/xunit/xunit/issues/293","labels_url":"https://api.github.com/repos/xunit/xunit/issues/293/labels{/name}","comments_url":"https://api.github.com/repos/xunit/xunit/issues/293/comments","events_url":"https://api.github.com/repos/xunit/xunit/issues/293/events","html_url":"https://github.com/xunit/xunit/issues/293","id":57373130,"number":293,"title":"System.TypeLoadException after using VS test runner","user":{"login":"llehn","id":10240910,"avatar_url":"https://avatars.githubusercontent.com/u/10240910?v=3","gravatar_id":"","url":"https://api.github.com/users/llehn","html_url":"https://github.com/llehn","followers_url":"https://api.github.com/users/llehn/followers","following_url":"https://api.github.com/users/llehn/following{/other_user}","gists_url":"https://api.github.com/users/llehn/gists{/gist_id}","starred_url":"https://api.github.com/users/llehn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/llehn/subscriptions","organizations_url":"https://api.github.com/users/llehn/orgs","repos_url":"https://api.github.com/users/llehn/repos","events_url":"https://api.github.com/users/llehn/events{/privacy}","received_events_url":"https://api.github.com/users/llehn/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/xunit/xunit/labels/Bug","name":"Bug","color":"e11d21"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-11T20:33:24Z","updated_at":"2015-02-12T07:35:54Z","closed_at":"2015-02-12T07:35:54Z","body":"I have integration test giving me this error on Win7 / VS2013 / .NET 4.5 (tried 3 different machines) using xunit 2 rc1 as well as xunit 1.9.2 (not at the same time, but both give this error)\r\n\r\n     System.TypeLoadException : The method \"CreateRequestContainer\" in Type  \r\n     \"My.Web.Host.Bootstrapper\" in the assembly \"My.Web.Host, Version=1.0.0.0, Culture=neutral, \r\n     PublicKeyToken=null\" has no implementation.\r\n\r\nMy test code looks like that:\r\n\r\n````c# \r\nusing (var bootstrapper = new Bootstrapper(\r\n               Persistence.PersistenceMode.Memory, \r\n               new FixturePopulation()))\r\n     {\r\n            ....\r\n````\r\n\r\nThe Bootstrapper class is custom implemented derived from Nancy.Bootstrappers.Autofac.NancyAutofacBootstrapper. There's also nhibernate initialization there (all wired by autofac). \r\n\r\nThe thing is, I only get this error when running the tests from the VS test explorer. When using the command line runner, I only get this error when I had a previous run using VS test explorer.\r\n\r\nBasically it's this way:\r\n-clean, build\r\n-run console runner -> not getting that error\r\n-run vs runner -> error\r\n-run console runner -> error\r\n\r\nRandomly it seems to work from the VS test runner, but only like 1, 2 times then it stops working and the error comes again.\r\n\r\nWhen I break at this exception in debugger, all required assemblies seem to be loaded into the current AppDomain, but entering \r\n````c# \r\ntypeof(My.Web.Host.Bootstrapper)\r\n````\r\nin the watch window doesn't give any result, but \"helper threw an exception\""},"comment":{"url":"https://api.github.com/repos/xunit/xunit/issues/comments/74029297","html_url":"https://github.com/xunit/xunit/issues/293#issuecomment-74029297","issue_url":"https://api.github.com/repos/xunit/xunit/issues/293","id":74029297,"user":{"login":"llehn","id":10240910,"avatar_url":"https://avatars.githubusercontent.com/u/10240910?v=3","gravatar_id":"","url":"https://api.github.com/users/llehn","html_url":"https://github.com/llehn","followers_url":"https://api.github.com/users/llehn/followers","following_url":"https://api.github.com/users/llehn/following{/other_user}","gists_url":"https://api.github.com/users/llehn/gists{/gist_id}","starred_url":"https://api.github.com/users/llehn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/llehn/subscriptions","organizations_url":"https://api.github.com/users/llehn/orgs","repos_url":"https://api.github.com/users/llehn/repos","events_url":"https://api.github.com/users/llehn/events{/privacy}","received_events_url":"https://api.github.com/users/llehn/received_events","type":"User","site_admin":false},"created_at":"2015-02-12T07:35:54Z","updated_at":"2015-02-12T07:35:54Z","body":"I found the cause while trying to strip down the project to create a minimal repro case. I had 2 projects using Nancy, but vastly different versions, which caused this problem, because one project was compiled against one version but run and tested against the other - what a fuckup, my bad. Issue can be closed.\r\n\r\n"}}