2017-11-03 16 views
1

私のプロジェクトでMicrosoft.Azure.DocumentDB 1.17.0を使用しています。 "ServiceInterop.dll" Microsoft.Azure.DocumentDB dllを持つフォルダにDllが存在します。しかし、それでもエラー以下になる[Microsoft.Azure.Documents.ServiceInterop.dll] DLLを読み込めません[Microsoft.Azure.DocumentDB 1.17.0を使用]

System.AggregateException: One or more errors occurred. ---> System.DllNotFoundException: Unable to load DLL 'Microsoft.Azure.Documents.ServiceInterop.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) 
    at Microsoft.Azure.Documents.ServiceInteropWrapper.CreateServiceProvider(String configJsonString, IntPtr& serviceProvider) 
    at Microsoft.Azure.Documents.Query.QueryPartitionProvider.Initialize() 
    at Microsoft.Azure.Documents.Query.QueryPartitionProvider.GetPartitionedQueryExecutionInfoInternal(SqlQuerySpec querySpec, PartitionKeyDefinition partitionKeyDefinition, Boolean requireFormattableOrderByQuery, Boolean isContinuationExpected) 
    at Microsoft.Azure.Documents.Query.DocumentQueryExecutionContextBase.<GetPartitionedQueryExecutionInfoAsync>d__0.MoveNext() 
--- End of stack trace from previous location where exception was thrown --- 
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
    at Microsoft.Azure.Documents.Query.DocumentQueryExecutionContextFactory.<CreateDocumentQueryExecutionContextAsync>d__5.MoveNext() 
--- End of stack trace from previous location where exception was thrown --- 
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
    at Microsoft.Azure.Documents.Linq.DocumentQuery`1.<CreateDocumentQueryExecutionContextAsync>d__12.MoveNext() 
    --- End of inner exception stack trace --- 
    at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) 
    at Microsoft.Azure.Documents.Linq.DocumentQuery`1.<GetEnumerator>d__b.MoveNext() 
    at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source) 
+0

をあなたはGitHubのレポでサンプルを共有することはできますか? – Baskar

+0

問題は、DocumentDB.Spatial.Sql.dllがDocumentDB(1.17)の一部でもある作業ディレクトリから見つからないために発生しました。しかし、エラーメッセージにdll(DocumentDB.Spatial.Sql.dll)が表示されませんでした存在しません...存在していたdll(Microsoft.Azure.Documents.ServiceInterop.dll)に対してエラーを出していました。 – usr021986

答えて

1

はい、これは私も観察された奇妙な問題です。何らかの理由で、CLRはMicrosoft.Azure.Documents.ServiceInterop.dllが実際にはDocumentDB.Spatial.Sql.dllが存在しないにもかかわらず欠落していると不平を言っています。これらの両方のネイティブdllが存在することを確認してください。 Microsoft.Azure.DocumentDB.Core(1.7.1)。

で、私はこの問題は https://www.nuget.org/packages/Microsoft.Azure.DocumentDB/ nugetパッケージをインストールすることにより、離れて行く作ったものの

+0

これは私のために働いた。特に私にとっては、このラインで起こる、ところであなた –

0

私は(同じ問題を取得しています。

PM> Install-Package Microsoft.Azure.DocumentDB -Version 1.19.1

同じ行でエラーが発生しました: メッセージ:{"Errors":["範囲指定されていないパスに対してフィルタで無効なクエリが指定されました。 "]}

それで、本質的に私の質問は何とか問題を抱えているように思えますが、フレームワークのナゲットをインストールする前に(コアナゲットを持っていただけです)、ライブラリは正常にエラーに応答していませんでした。

fwiw私は/ c(ウィンドウ10cドライブ)と/ z(私のソースがあるマウントされたデータドライブ)を覆いました - ここでこれらのdllがどこにあるのかを見てください。

OK、実際のクエリを修正しよう!また

、FWIW: このdocによれば、これは多分.NETバージョンおよび/または.NETコアに退縮した、過去に固定されていることを意味 https://docs.microsoft.com/en-us/azure/cosmos-db/sql-api-sdk-dotnet

1.11.0 Fix for automatic binplacing of Microsoft.Azure.Documents.ServiceInterop.dll and DocumentDB.Spatial.Sql.dll assemblies to application’s bin folder when using the Nuget package with projects that have project.json tooling.

1.9.2 Fixed the missing references to DocumentDB.Spatial.Sql.dll and Microsoft.Azure.Documents.ServiceInterop.dll that are required when referencing an Azure Cosmos DB project with a reference to the Azure Cosmos DB Nuget package.

2.0バージョン?

[1]

$ find /c -iname "*Microsoft.Azure.Documents.ServiceInterop.dll*" 
./Users/<myuser>/.nuget/packages/microsoft.azure.documentdb/1.19.1/runtimes/win7-x64/native/Microsoft.Azure.Documents.ServiceInterop.dll 
./Users/<myuser>/.nuget/packages/microsoft.azure.documentdb/1.6.1/build/native/Microsoft.Azure.Documents.ServiceInterop.dll 
./Users/<myuser>/.nuget/packages/microsoft.azure.documentdb.core/1.7.1/runtimes/win/native/Microsoft.Azure.Documents.ServiceInterop.dll 
./Users/<myuser>/AppData/Local/Azure.Functions.Cli/1.0.7/Microsoft.Azure.Documents.ServiceInterop.dll 


$ find /z -iname "*Microsoft.Azure.Documents.ServiceInterop.dll*" 
./Git/documentdb-dotnet-todo-app/packages/Microsoft.Azure.DocumentDB.1.6.1/build/native/Microsoft.Azure.Documents.ServiceInterop.dll 
./Git/documentdb-dotnet-todo-app/src/bin/Microsoft.Azure.Documents.ServiceInterop.dll 
./Git/ReturnAdB2cGroups/CalorieCruncher/bin/Debug/netstandard2.0/bin/runtimes/win/native/Microsoft.Azure.Documents.ServiceInterop.dll 
./Git/ReturnAdB2cGroups/CalorieCruncher/bin/Debug/netstandard2.0/bin/runtimes/win7-x64/native/Microsoft.Azure.Documents.ServiceInterop.dll 
./Git/ReturnAdB2cGroups/CalorieCruncher/bin/Debug/netstandard2.0/Microsoft.Azure.Documents.ServiceInterop.dll 
./Git/ReturnAdB2cGroups/packages/Microsoft.Azure.DocumentDB.1.6.1/build/native/Microsoft.Azure.Documents.ServiceInterop.dll 
./Git/ReturnAdB2cGroups/ReturnAdB2cGroups/bin/Debug/netstandard2.0/bin/runtimes/win/native/Microsoft.Azure.Documents.ServiceInterop.dll 
+0

をありがとうございます。varクエリ= client.CreateDocumentQuery ( UriFactory.CreateDocumentCollectionUri(DatabaseId、CollectionId)、 新しいFeedOptions {MaxItemCount = -1、EnableCrossPartitionQuery =真}) 。 Where(述語) .AsDocumentQuery(); var results = new List (); while(query.HasMoreResults)results.AddRange(await query.ExecuteNextAsync ()); – ubienewbie

関連する問題