DynamicMethod.GetMethodBody() throws exception See this answer for workaround http://stackoverflow.com/a/4147132/259946