{"action":"opened","issue":{"url":"https://api.github.com/repos/Azure/azure-documentdb-dotnet/issues/158","repository_url":"https://api.github.com/repos/Azure/azure-documentdb-dotnet","labels_url":"https://api.github.com/repos/Azure/azure-documentdb-dotnet/issues/158/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-documentdb-dotnet/issues/158/comments","events_url":"https://api.github.com/repos/Azure/azure-documentdb-dotnet/issues/158/events","html_url":"https://github.com/Azure/azure-documentdb-dotnet/issues/158","id":183546488,"number":158,"title":"BadImageFormatException","user":{"login":"bret-fynewever","id":847972,"avatar_url":"https://avatars.githubusercontent.com/u/847972?v=3","gravatar_id":"","url":"https://api.github.com/users/bret-fynewever","html_url":"https://github.com/bret-fynewever","followers_url":"https://api.github.com/users/bret-fynewever/followers","following_url":"https://api.github.com/users/bret-fynewever/following{/other_user}","gists_url":"https://api.github.com/users/bret-fynewever/gists{/gist_id}","starred_url":"https://api.github.com/users/bret-fynewever/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bret-fynewever/subscriptions","organizations_url":"https://api.github.com/users/bret-fynewever/orgs","repos_url":"https://api.github.com/users/bret-fynewever/repos","events_url":"https://api.github.com/users/bret-fynewever/events{/privacy}","received_events_url":"https://api.github.com/users/bret-fynewever/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-17T22:36:29Z","updated_at":"2016-10-17T22:36:29Z","closed_at":null,"body":"I'm receiving a BadImageFormatException when attempting to exercise the DocumentDB .NET SDK via a Microsoft unit test method--stack trace is below.  I've wrapped the DocumentDB functionality in a separate assembly.\r\nTargeting .NET Framework 4.6.1 and Microsoft.Azure.DocumentDB version 1.10.0 via NuGet.\r\nThe exception occurs on a call to IDocumentQuery.ExecuteNextAsync.\r\nAny help would be greatly appreciated.\r\n\r\nResult StackTrace:\t\r\nat Microsoft.Azure.Documents.ServiceInteropWrapper.CreateServiceProvider(String configJsonString, IntPtr& serviceProvider)\r\n   at Microsoft.Azure.Documents.Query.QueryPartitionProvider.InitializeServiceProvider()\r\n   at Microsoft.Azure.Documents.Query.QueryPartitionProvider.GetPartitionedQueryExecutionInfo(SqlQuerySpec querySpec, PartitionKeyDefinition partitionKeyDefinition)\r\n   at Microsoft.Azure.Documents.Routing.PartitionRoutingHelper.GetProvidedPartitionKeyRanges(SqlQuerySpec querySpec, Boolean enableCrossPartitionQuery, Boolean parallelizeCrossPartitionQuery, PartitionKeyDefinition partitionKeyDefinition, QueryPartitionProvider queryPartitionProvider, String clientApiVersion, QueryInfo& queryInfo)\r\n   at Microsoft.Azure.Documents.Query.DefaultDocumentQueryExecutionContext.<TryGetTargetPartitionKeyRangeAsync>d__18.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)\r\n   at Microsoft.Azure.Documents.Query.DefaultDocumentQueryExecutionContext.<ExecuteOnceAsync>d__3.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Azure.Documents.BackoffRetryUtility`1.<>c__DisplayClass2.<<ExecuteAsync>b__1>d__4.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Azure.Documents.BackoffRetryUtility`1.<ExecuteRetry>d__16.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Azure.Documents.BackoffRetryUtility`1.<ExecuteAsync>d__7.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Azure.Documents.Query.DocumentQueryExecutionContextBase.<ExecuteWithRetryPolicy>d__1b.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Azure.Documents.Query.DefaultDocumentQueryExecutionContext.<ExecuteInternalAsync>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Azure.Documents.Query.DocumentQueryExecutionContextBase.<ExecuteNextAsync>d__4.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Azure.Documents.Linq.DocumentQuery`1.<ExecuteNextPrivateAsync>d__17`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at XXXXXX.YYYYYY.Core.DocumentServices.BaseDocumentService`1.<GetAsync>d__7.MoveNext() in C:\\Users\\bretfynewever\\OneDrive\\Projects\\XXXXXX\\XXXXXX-YYYYYY-chiller-dashboard\\XXXXXX.YYYYYY.Core\\DocumentServices\\BaseDocumentService.cs:line 0\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at XXXXXX.YYYYYY.Core.DocumentServices.BaseDocumentService`1.<GetAllAsync>d__8.MoveNext() in C:\\Users\\bretfynewever\\OneDrive\\Projects\\XXXXXX\\XXXXXX-YYYYYY-chiller-dashboard\\XXXXXX.YYYYYY.Core\\DocumentServices\\BaseDocumentService.cs:line 0\r\n --- End of inner exception stack trace ---\r\n    at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)\r\n   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)\r\n   at System.Threading.Tasks.Task`1.get_Result()\r\n   at XXXXXX.YYYYYY.Core.Tests.ChillerReportTest.Test_GetAll() in C:\\Users\\bretfynewever\\OneDrive\\Projects\\XXXXXX\\XXXXXX-YYYYYY-chiller-dashboard\\XXXXXX.YYYYYY.Core.Tests\\ChillerReportTest.cs:line 22\r\nResult Message:\t\r\nTest method XXXXXX.YYYYYY.Core.Tests.ChillerReportTest.Test_GetAll threw exception: \r\nSystem.AggregateException: One or more errors occurred. ---> System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)\r\n\r\n"}}
{"actor":{"display_login":"bret-fynewever"}}