Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 有没有可能摆脱这场恶作剧?_C#_Azure_Nuget_Azure Functions_Nuget Package - Fatal编程技术网

C# 有没有可能摆脱这场恶作剧?

C# 有没有可能摆脱这场恶作剧?,c#,azure,nuget,azure-functions,nuget-package,C#,Azure,Nuget,Azure Functions,Nuget Package,我希望我的项目有以下软件包 Microsoft.Azure.ServiceBus Microsoft.Azure.WebJobs.Extensions Microsoft.Azure.WebJobs.Extensions.Storage Microsoft.Azure.WebJobs.ServiceBus Microsoft.NET.Sdk.0功能 .NETStandard图书馆 Json 现在我有最新的版本 Microsoft.Azure.ServiceBus(3.1.1) Micros

我希望我的项目有以下软件包

  • Microsoft.Azure.ServiceBus
  • Microsoft.Azure.WebJobs.Extensions
  • Microsoft.Azure.WebJobs.Extensions.Storage
  • Microsoft.Azure.WebJobs.ServiceBus
  • Microsoft.NET.Sdk.0功能
  • .NETStandard图书馆
  • Json
现在我有最新的版本

  • Microsoft.Azure.ServiceBus(3.1.1)
  • Microsoft.Azure.WebJobs.Extensions(3.0.0)
  • Microsoft.Azure.WebJobs.Extensions.Storage(3.0.0)
  • Microsoft.Azure.WebJobs.ServiceBus(v3.0.0-beta8)
  • Microsoft.NET.Sdk.Functions(1.0.22)
  • .NETStandard库(2.0.1)
  • Newtonsoft.Json(11.0.2)
具有以下WebJobs依赖项的:

  • Microsoft.Azure.ServiceBus[无]
  • Microsoft.Azure.WebJobs.Extensions[Microsoft.Azure.WebJobs(>=3.0.0)]
  • Microsoft.Azure.WebJobs.Extensions.Storage[Microsoft.Azure.WebJobs(>=3.0.0)]
  • Microsoft.Azure.WebJobs.ServiceBus[Microsoft.Azure.WebJobs(=2.2.0)]
  • Microsoft.NET.Sdk.Functions[Microsoft.Azure.WebJobs(>=3.0.0&&<3.1.0)]
  • .NETStandard库[无]
  • Newtonsoft.Json[None]
有趣的是,VisualStudio并没有将此标记为问题(在解决方案资源管理器中没有黄色三角形),即使存在明显冲突的版本要求。当我尝试构建我的函数应用程序项目时,我得到了一个错误

严重性代码说明项目文件行抑制状态 错误System.IO.FileNotFoundException:无法加载文件或 程序集“Microsoft.Azure.WebJobs,版本=3.0.0.0,区域性=中性, PublicKeyToken=null'或其依赖项之一。系统不能 查找指定的文件。文件名:'Microsoft.Azure.WebJobs, 版本=3.0.0.0,区域性=中性,PublicKeyToken=空'at' System.ModuleHandle.ResolveType(RuntimeModule模块,Int32 typeToken, IntPtr*类型安装RGS、Int32类型安装计数、IntPtr*方法安装RGS、, Int32 methodInstCount,ObjectHandleOnStack类型)位于 System.ModuleHandle.ResolveTypeHandleInternal(运行时模块模块, Int32 typeToken,RuntimeTypeHandle[]TypeInstanceContext, RuntimeTypeHandle[]方法实例化上下文)位于 System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, 类型[]genericTypeArguments,类型[]genericMethodArguments)位于 System.Reflection.CustomAttribute.FilterCustomAttribute记录(CustomAttributeRecord caRecord、元数据导入范围、程序集和LastAptCookAssembly, RuntimeModule decoratedModule,MetadataToken decoratedToken, RuntimeType attributeFilterType,布尔值必须不可编辑,对象[] 属性、IList derivedAttributes、RuntimeType和attributeType, IRuntimeMethodInfo&ctor,布尔&ctor参数,布尔& isVarArg)在 System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule、Int32 decoratedMetadataToken、Int32 pcaCount、, RuntimeType attributeFilterType,布尔值必须不可编辑,IList 派生属性,布尔值在 System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeParameterInfo 参数,RuntimeType(caType)位于 System.Attribute.InternalParamGetCustomAttributes(ParameterInfo param, 类型类型,布尔值继承)位于 MakeFunctionJson.ParameterInfo扩展名.GetDisabledAttribute(ParameterInfo 参数信息)在 System.Linq.Enumerable.whereselectArrayInterator
2.MoveNext()位于
System.Linq.Enumerable.WhereEnumerableInterator
1.MoveNext()位于 System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable
1 source)
在MakeFunctionJson.MethodInfoExtensions.GetDisabled(MethodInfo 方法)在 MakeFunctionJson.MethodInfoExtensions.hasUnportedAttributes(MethodInfo 方法、字符串和错误) MakeFunctionJson.FunctionJsonConverter.d__9.MoveNext() 位于System.Collections.Generic.List
1..ctor(IEnumerable
1 collection)
在System.Linq.Enumerable.ToList[TSource](IEnumerable
1 source)处 MakeFunctionJson.FunctionJsonConverter.TryGenerateFunctionJsons()
在MakeFunctionJson.FunctionJsonConverter.TryRun()处

警告:程序集绑定日志记录已关闭。要启用程序集绑定 记录失败,请设置注册表值 [HKLM\Software\Microsoft\Fusion!EnableLog](DWORD)到1。注:有 某些性能损失是否与程序集绑定失败相关 登录中。要关闭此功能,请删除注册表值 [HKLM\Software\Microsoft\Fusion!EnableLog]

生成函数元数据时出错


有什么办法可以摆脱这个地狱,或者我不能使用所有这些软件包?我试着查看以前的版本,但似乎没有办法让他们都同意WebJobs的版本。通常如何解决这些情况?

删除
Microsoft.Azure.WebJobs.ServiceBus
,新包现在称为
Microsoft.Azure.WebJobs.Extensions.ServiceBus(3.0.0)
。请参见v2函数中的

此外,
Microsoft.NET.Sdk.Functions(1.0.22)
包含
Newtonsoft.Json(11.0.2)
Microsoft.Azure.WebJobs.Extensions(3.0.0)
,无需单独安装。和
Microsoft.Azure.WebJobs.Extensions.ServiceBus(3.0.0)
也包含
Microsoft.Azure.ServiceBus(3.0.2)
,只要不需要最新版本,您也不需要安装它

例如,您可以在VS中创建v2 servicebus触发器模板,只需添加
Microsoft.Azure.WebJobs.Extensions.Storage(3.0.0)
即可实现您的目标