{"action":"opened","issue":{"url":"https://api.github.com/repos/serilog/serilog-sinks-azuredocumentdb/issues/42","repository_url":"https://api.github.com/repos/serilog/serilog-sinks-azuredocumentdb","labels_url":"https://api.github.com/repos/serilog/serilog-sinks-azuredocumentdb/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/serilog/serilog-sinks-azuredocumentdb/issues/42/comments","events_url":"https://api.github.com/repos/serilog/serilog-sinks-azuredocumentdb/issues/42/events","html_url":"https://github.com/serilog/serilog-sinks-azuredocumentdb/issues/42","id":198947874,"number":42,"title":"CreateDatabaseIfNotExistsAsync not working when using newer ddb client","user":{"login":"vip32","id":164303,"avatar_url":"https://avatars.githubusercontent.com/u/164303?v=3","gravatar_id":"","url":"https://api.github.com/users/vip32","html_url":"https://github.com/vip32","followers_url":"https://api.github.com/users/vip32/followers","following_url":"https://api.github.com/users/vip32/following{/other_user}","gists_url":"https://api.github.com/users/vip32/gists{/gist_id}","starred_url":"https://api.github.com/users/vip32/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vip32/subscriptions","organizations_url":"https://api.github.com/users/vip32/orgs","repos_url":"https://api.github.com/users/vip32/repos","events_url":"https://api.github.com/users/vip32/events{/privacy}","received_events_url":"https://api.github.com/users/vip32/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-01-05T12:44:39Z","updated_at":"2017-01-05T12:44:39Z","closed_at":null,"body":"Hi,\r\nwhen using this sink with the newer Microsoft.Azure.DocumentDB Client (1.11.1) the following error occurs at runtime: \r\n\r\n```[MissingMethodException: Method not found: 'System.Threading.Tasks.Task Microsoft.Azure.Documents.Client.DocumentClient.OpenAsync()'.]\r\n   Serilog.Sinks.AzureDocumentDb.<CreateDatabaseIfNotExistsAsync>d__12.MoveNext() +0\r\n   System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start(TStateMachine& stateMachine) +124\r\n   Serilog.Sinks.AzureDocumentDb.AzureDocumentDBSink.CreateDatabaseIfNotExistsAsync(String databaseName) +137\r\n```\r\nit seems that the OpenAsync() on the client lib has changed slightly: an optional cancellation token can now be supplied. \r\n\r\nold: \r\n![image](https://cloud.githubusercontent.com/assets/164303/21680498/6fba94e0-d34a-11e6-9a2f-3c490e9dc5b1.png)\r\n\r\nnew: \r\n![image](https://cloud.githubusercontent.com/assets/164303/21680516/85a2405a-d34a-11e6-90ee-846d967d3314.png)\r\n\r\ni cannot explain this runtime behaviour as it is a new optional argument, it should work ;)\r\n\r\ni would love to do a PR and update this project so it uses ddb client 1.11.1 and this issue probably will go away. however i have a hard time even opening this core project in vs15/17rc (nothing but vs errors). will later try on another box..."}}
{"actor":{"display_login":"vip32"}}