无法加载DLL'Microsoft.Azure.Documents.ServiceInterop.dll'[使用Microsoft.Azure.WebJobs.Extensions.CosmosDB版本3.0.0-beta7]

时间:2018-04-12 16:38:30

标签: azure azure-functions azure-cosmosdb

我正在使用以下软件包。

<PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
    <AzureFunctionsVersion>v2</AzureFunctionsVersion>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.CosmosDB" Version="3.0.0-beta7" />
    <PackageReference Include="Microsoft.DotNet.Analyzers.Compatibility" Version="0.2.12-alpha" />
    <PackageReference Include="Microsoft.Extensions.Configuration" Version="2.0.0" />
    <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.13" />
    <PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
    <PackageReference Include="stream-net" Version="2.0.3" />
  </ItemGroup>

我使用Visual Studio 15.6.4版与Azure Functions和WebJob Tools 15.0.4045.0版。运行基本的CosmosDB更改源处理功能时,获取以下异常。

[12-04-2018 16:32:37] The listener for function 'StreamInserter' was unable to start.
[12-04-2018 16:32:37] The listener for function 'StreamInserter' was unable to start. 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).
[12-04-2018 16:32:37] The listener for function 'StreamInserter' was unable to start. 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).
[12-04-2018 16:32:37]
[12-04-2018 16:32:37] Host started (5716ms)
[12-04-2018 16:32:37] Job host started
[12-04-2018 16:32:37] The following 1 functions are in error:
[12-04-2018 16:32:37] StreamInserter: The listener for function 'StreamInserter' was unable to start. 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)

这是我的azure函数中的代码

    [FunctionName("StreamInserter")]
    public static void Run(
        [CosmosDBTrigger("db-local", "socialData", ConnectionStringSetting="CosmosDBConnectionString", LeaseDatabaseName ="db-local", LeaseCollectionName = "leases", LeasesCollectionThroughput = 400)]
        IReadOnlyList<Document> changedFeedItems, 
        TraceWriter log,
        ExecutionContext context)
{
                    log.Info($"Received {changedFeedItems.Count} Documents from change feed processor");
}

0 个答案:

没有答案
相关问题