[英]Error in Azure functions 2.x are you missing an assembly reference?
我在C#中運行Azure功能2.0時在Azure雲門戶中遇到錯誤
The type or namespace name 'Management' does not exist in the namespace 'Microsoft.Azure' (are you missing an assembly reference?)
run.csx文件是
using System;
using Microsoft.Azure.Management.ContainerInstance.Fluent;
public static void Run(string myEventHubMessage, ILogger log)
{
log.LogInformation($"C# Event Hub trigger function processed a message: {myEventHubMessage}");
}
它的依賴項文件是function.proj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.ContainerInstance.Fluent" Version="1.16.1" />
</ItemGroup>
</Project>
我嘗試使用新功能的應用程序在門戶中重新創建您的問題。 起初,我遇到了同樣的錯誤,我認為是因為程序包還原失敗或沒有首先運行。 嘗試刪除並重新創建您的function.proj文件。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.