{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/BotBuilder/issues/166","repository_url":"https://api.github.com/repos/Microsoft/BotBuilder","labels_url":"https://api.github.com/repos/Microsoft/BotBuilder/issues/166/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/BotBuilder/issues/166/comments","events_url":"https://api.github.com/repos/Microsoft/BotBuilder/issues/166/events","html_url":"https://github.com/Microsoft/BotBuilder/issues/166","id":150326263,"number":166,"title":"Exception thrown: 'System.TypeInitializationException'  in webapp","user":{"login":"ganeshnj","id":8882380,"avatar_url":"https://avatars.githubusercontent.com/u/8882380?v=3","gravatar_id":"","url":"https://api.github.com/users/ganeshnj","html_url":"https://github.com/ganeshnj","followers_url":"https://api.github.com/users/ganeshnj/followers","following_url":"https://api.github.com/users/ganeshnj/following{/other_user}","gists_url":"https://api.github.com/users/ganeshnj/gists{/gist_id}","starred_url":"https://api.github.com/users/ganeshnj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ganeshnj/subscriptions","organizations_url":"https://api.github.com/users/ganeshnj/orgs","repos_url":"https://api.github.com/users/ganeshnj/repos","events_url":"https://api.github.com/users/ganeshnj/events{/privacy}","received_events_url":"https://api.github.com/users/ganeshnj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-22T09:53:56Z","updated_at":"2016-04-22T16:40:26Z","closed_at":null,"body":"I have an existing Asp.net MVC application and I’m trying to add BotBuilder functionality using an ApiController as shown in the getting started tutorial. Everything works fine until I don’t add Dialog. As soon as I add the below line, the application throws “**System.TypeInitializationException**”.\r\n\r\n`return await Conversation.SendAsync(message, () => new EchoDialog());`\r\n\r\nAt the end the controller returns 500 Internet Server Error.\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/BotBuilder/issues/comments/213502290","html_url":"https://github.com/Microsoft/BotBuilder/issues/166#issuecomment-213502290","issue_url":"https://api.github.com/repos/Microsoft/BotBuilder/issues/166","id":213502290,"user":{"login":"willportnoy","id":17912714,"avatar_url":"https://avatars.githubusercontent.com/u/17912714?v=3","gravatar_id":"","url":"https://api.github.com/users/willportnoy","html_url":"https://github.com/willportnoy","followers_url":"https://api.github.com/users/willportnoy/followers","following_url":"https://api.github.com/users/willportnoy/following{/other_user}","gists_url":"https://api.github.com/users/willportnoy/gists{/gist_id}","starred_url":"https://api.github.com/users/willportnoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willportnoy/subscriptions","organizations_url":"https://api.github.com/users/willportnoy/orgs","repos_url":"https://api.github.com/users/willportnoy/repos","events_url":"https://api.github.com/users/willportnoy/events{/privacy}","received_events_url":"https://api.github.com/users/willportnoy/received_events","type":"User","site_admin":false},"created_at":"2016-04-22T16:40:26Z","updated_at":"2016-04-22T16:40:26Z","body":"If you can report the inner exception within the TypeInitializationException, that would help us diagnose the issue.  There is a static constructor on the Conversation class, so I would expect it to come from that code or from a missing dependency as mentioned by @darrenjefford.\r\n"}}