The specified module could not be found.
Running in latest Service Fabric.
Using Microsoft.Azure.DocumentDB.Core 1.4.0
It looks like this was an issue with the none core version of the package as well.
Further clarification. I added the Nuget package to the Service Fabric executable project, hoping that it would cause the ServiceInterop file to be included in the deployment package, but I still got the exception.
We are currently investigating the root cause. If anyone is running into similar issue, you can get unblocked by directly referencing the missing assemblies. We will update this thread once we find the root cause.
This issue can be reproduced in below environment
This is build issue and is covered at https://github.com/dotnet/sdk/issues/901. It also suggests a workaround https://github.com/dotnet/sdk/issues/901#issuecomment-316191996 which addresses the issue.
@kirankumarkolli
If it's not possible for the DocumentDb team to provide a fix for this in the next release (as this seems like a lower level issue) it would be very helpful if a readme was provided in the Nuget package documenting the issue. Even better might be a warning in the Nuget package description.
I do have a related question though. The current Nuget package includes native binaries for windows, does that mean this library couldn't be used on other platforms?
We are exploring ways to document known issues and as part of it we will include it as well.
Thanks for feedback. @jackbond can we close this issue?
@jackbond closing this issue.
@kirankumarkolli
I've recreated this problem NOT using Service Fabric and using PackageReferences (as opposed to packages.config) Can you please reopen this issue? Here's a minimal solution that reproduces the problem.
repro.zip
Reopening it to investigate the issue.
@kirankumarkolli
Have you had any luck resolving this issue? This bug is preventing us from using the .netstandard version of the DocDb library, which in turn prevents us from migrating / converting some of our projects to either .netstandard or .netcore.
Having the same issue using Azure Functions V2 (1.0.7)
me too - an azure functions app targeting .net standard 2.0
Issue just started happening for me, too.
I also have the issue in Azure Functions targeting .NET Standard 2.0 ... the ServiceInterop assembly is available in the bin\Debug\netstandard2.0\bin\runtimes\win\native folder.
However, I added a reference to the full .NET Framework NuGet package of Documentdb (1.19.1) in addition to the .NET Core DocumentDb NuGet package ... and now it works locally and online in Azure Functions. Maybe this workaround works for someone else too until this gets fixed by MSFT.
I also solved it by upgrading to 1.19.1. I put the details on SO. https://stackoverflow.com/questions/47087725/unable-to-load-dll-microsoft-azure-documents-serviceinterop-dll-using-microso/48252893#48252893
I had this issue with my Azure Function as well. Solved by uninstalling all the NuGet packages and re-installing the latest Microsoft.NET.Sdk.Functions and Microsoft.Azure.Graphs (which depended on Microsoft.Azure.DocumentDB). A tutorial I was following recommended installing Mono.CSharp. However, by not including this package, my function ran successfully both on my local machine and in Azure.
Hope this helps pin down the issue for someone.
It happens for me as well.
Unable to load DLL 'Microsoft.Azure.Documents.ServiceInterop.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
@loneshark99 what is the project type (Framework, Core, Standard)? Also is SDK nuget installed in the project or in the reference project?
@kirankumarkolli Sorry it was my issue, I added the .core nuget instead of the client one. Its gone now.
I'm facing the same issue when running locally a functions v2 project with target "netstandard2.0" and nuget Microsoft.Azure.DocumentDB.Core version 1.9.1 installed, The Microsoft.Azure.Documents.ServiceInterop.dll is present in "bin/runtimes/win/native" folder:
System.Private.CoreLib: Exception while executing function: FUNCTION_NAME. System.Private.CoreLib: One or more errors occurred. (Unable to load DLL 'Microsoft.Azure.Documents.ServiceInterop.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)). Microsoft.Azure.DocumentDB.Core: Unable to load DLL 'Microsoft.Azure.Documents.ServiceInterop.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E).
Most helpful comment
Having the same issue using Azure Functions V2 (1.0.7)