gpt4 book ai didi

c# - 无法解析引用 Microsoft.Azure.WebJobs.Extensions - 元数据生成失败

转载 作者:行者123 更新时间:2023-12-03 16:30:00 26 4
gpt4 key购买 nike

不得不从另一位开发人员那里接手一些工作,所以我只是想把它全部搞清楚!

但是我在构建 Azure Functions 项目时遇到问题,并且不断收到来自 Microsoft.NET.Sdk.Functions.Build.targets 的错误,特别是无法解析对 的引用Microsoft.Azure.WebJobs.Extensions

到目前为止,我已尝试重新安装 Nuget 包、重新启动 Visual Studio、我的机器 yada-yada。

我欢迎任何建议,感谢您抽出时间!

下面的完整错误

Severity    Code    Description Project File    Line    Suppression State
Error Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'Microsoft.Azure.WebJobs.Extensions, Version=3.0.6.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
at Mono.Cecil.BaseAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters)
at Mono.Cecil.BaseAssemblyResolver.Resolve(AssemblyNameReference name)
at Mono.Cecil.DefaultAssemblyResolver.Resolve(AssemblyNameReference name)
at Mono.Cecil.MetadataResolver.Resolve(TypeReference type)
at Mono.Cecil.ModuleDefinition.Resolve(TypeReference type)
at Mono.Cecil.TypeReference.Resolve()
at MakeFunctionJson.AttributeExtensions.IsWebJobsAttribute(CustomAttribute attribute)
at MakeFunctionJson.ParameterInfoExtensions.<>c.<IsWebJobSdkTriggerParameter>b__0_0(CustomAttribute a)
at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
at MakeFunctionJson.ParameterInfoExtensions.IsWebJobSdkTriggerParameter(ParameterDefinition parameterInfo)
at MakeFunctionJson.MethodInfoExtensions.<>c.<HasTriggerAttribute>b__4_0(ParameterDefinition p)
at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
at MakeFunctionJson.MethodInfoExtensions.HasTriggerAttribute(MethodDefinition method)
at MakeFunctionJson.MethodInfoExtensions.HasValidWebJobSdkTriggerAttribute(MethodDefinition method)
at MakeFunctionJson.FunctionJsonConverter.GenerateFunctions(IEnumerable`1 types)+MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at MakeFunctionJson.FunctionJsonConverter.TryGenerateFunctionJsons()
at MakeFunctionJson.FunctionJsonConverter.TryRun()
Error generating functions metadata
Panmure.RiskMI.DataCollector.Functions

最佳答案

我在运行项目时看到一条消息,提示“扩展元数据生成器包未正确导入”尝试将 Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator nuget 包添加到项目中。它应该作为 Microsoft.NET.Sdk.Functions 包的依赖项加载,但我在项目依赖项列表中没有看到它。这对我有用。

关于c# - 无法解析引用 Microsoft.Azure.WebJobs.Extensions - 元数据生成失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63414375/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com