Unable to load DLL 'Microsoft.Azure.Cosmos.ServiceInterop.dll'
Closed this issue · 5 comments
Love the gremlin+sql combo. Tried this in the default azure hello gremlin c# project.
-client initializes fine
-gremlin call runs fine
-sql call returns the error below
_cosmosClient = await CosmosClientGraph.GetClientWithSql(accountName, authKey, database, collection);
var read = (await _cosmosClient.ExecuteGremlin<dynamic>($"g.V()")).Result;
var read2 = await _cosmosClient.ExecuteSQL<string>($"select * from c");
"Unable to load DLL 'Microsoft.Azure.Cosmos.ServiceInterop.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"
Can you give me a bit more details about the issue?
I've just tried to reproduce it on a new blank app and it looks like it's working fine (tried .NET Core 3 and .NET core 2.2)
Can you send me a link to the project you're referring to?
I tried it on the sample project you get when using the "quick start" option in the azure cosmos portal. https://github.com/Azure-Samples/azure-cosmos-db-graph-gremlindotnet-getting-started
It's a net461 console app by default. thanks for the fast response.
.net core 3 doesn't throw the error, but the call returns null after consuming a few RU's. I tried to include a partitionKey, but that gave the same result.
Thank you!
I am able to reproduce both issues. Will be looking into this and hope to have a fix very soon.
-
For the interop issue, that seems to be an edge case around the nuget packaging and restoring in a .NET framework context - works as expected in a .NET Core app. As a workaround, you can install the Microsoft.Azure.Cosmos nuget package alongside with this nuget and it will work
-
For the SQL query returning null, that was a but that will get fixed in the next release (look out for v3.0.2
Thank you for your feedback!
@alexdrenea just confirming - this works as expected now. Comment and close... Cheers, Gregor.