Pro*_*rod 0 c# azure azure-functions
我在Visual Studio 15.8.6中有一个Azure Functions(v2)项目,该项目安装了Azure Functions和Web Job Tools 5.2.60618.0.我正在使用ServiceBusTrigger.当我尝试编译项目时,我继续得到:
严重级代码描述项目文件行抑制状态错误System.IO.FileNotFoundException:无法加载文件或程序集"Microsoft.Azure.WebJobs,Version = 3.0.0.0,Culture = neutral,PublicKeyToken = null"或其依赖项之一.该系统找不到指定的文件.文件名:System.ModuleHandle.ResolveType上的'Microsoft.Azure.WebJobs,Version = 3.0.0.0,Culture = neutral,PublicKeyToken = null'(RuntimeModule模块,Int32 typeToken,IntPtr*typeInstArgs,Int32 typeInstCount,IntPtr*methodInstArgs,Int32 methodInstCount System.FoduleHandle.ResolveTypeHandleInternal(RuntimeModule模块,Int32 typeToken,RuntimeTypeHandle [] typeInstantiationContext,RuntimeTypeHandle [] methodInstantiationContext),System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken,Type [] genericTypeArguments,Type [] genericMethodArguments)at,SystemHandleOnStack type) System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord,MetadataImport scope,Assembly&lastAptcaOkAssembly,RuntimeModule decoratedModule,MetadataToken decoratedToken,RuntimeType attributeFilterType,Boolean mustBeInheritable,Object [] attributes,IList derivedAttributes,RuntimeType&attributeType,IRuntimeMethodInfo&ctor,Boolean&ctorHasParameters,Boolean&isVarArg)处System.Reflection.CustomAttribute.GetCustomAttributes System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule,的Int32 decoratedMetadataToken,的Int32 pcaCount,RuntimeType attributeFilterType,布尔mustBeInheritable,IList的derivedAttributes,布尔isDecoratedTargetSecurityTransparent)(在系统RuntimeParameterInfo参数,RuntimeType caType). System.Linq.Enumerable.WhereSelectArrayIterator的
2.MoveNext() at System.Linq.Enumerable.WhereEnumerableIteratorMakeFunctionJson.ParameterInfoExtensions.GetDisabledAttribute(ParameterInfo parameterInfo)中的Attribute.InternalParamGetCustomAttributes(ParameterInfo param,Type type,Boolean inherit)System.Linq.Enumerable.FirstOrDefault [TSource]中的1.MoveNext()(IEnumerable1 source) at MakeFunctionJson.MethodInfoExtensions.GetDisabled(MethodInfo method) at MakeFunctionJson.MethodInfoExtensions.HasUnsuportedAttributes(MethodInfo method, String& error) at MakeFunctionJson.FunctionJsonConverter.<GenerateFunctions>d__9.MoveNext() at System.Collections.Generic.List1)1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable在MakeFunctionJson.FunctionJsonConverter.TryRun()的MakeFunctionJson.FunctionJsonConverter.TryGenerateFunctionJsons()中的..ctor(IEnumerable 1 source)警告:装配绑定日志记录已关闭.要启用程序集绑定失败日志记录,请将注册表值[HKLM\Software\Microsoft\Fusion!EnableLog](DWORD)设置为1.注意:程序集绑定失败日志记录会导致一些性能损失.要关闭此功能,请删除注册表值[HKLM\Software\Microsoft\Fusion!EnableLog].
生成函数元数据时出错InSysFunctionDeviceMinuteDataProcessorV2 C:\ Users\Dr Kurt Richardson.nuget\packages\microsoft.net.sdk.functions\1.0.22\build \netstandard1.0\Microsoft.NET.Sdk.Functions.Build.targets 39
虽然它抱怨Microsoft.Azure.WebJobs 3.0.0.0缺失,但它已清楚地列在已安装的软件包中:
我注意到的一件事是,尽管该项目使用的是.NET Standard v2.0.3,但错误消息是指包含netstandard1.0的路径(... nuget\packages\microsoft.net.sdk.functions\1.0.22\build \netstandard1.0\Microsoft.NET.Sdk.Functions.Build.targets 3).Nuget说Microsoft.NET.Sdk.Functions的v1.0.22以.NETStandard为目标,Version = v2.0.此外,Microsoft.Azure.WebJobs位于netstandard2.0文件夹中.这可能是问题吗?或者是其他东西?
请参阅v2中的包引用.
Microsoft.Azure.WebJobs.ServiceBus已更名到Microsoft.Azure.WebJobs.Extensions.ServiceBus并Microsoft.Azure.WebJobs包含在Microsoft.NET.Sdk.Functions,无需单独安装.
请将Azure功能和Web作业工具更新到最新版本(现在是15.10.2009.0).
使用最新的扩展和模板,当我们创建服务总线触发器时,现在是默认的nuget依赖项
Microsoft.Azure.WebJobs.Extensions.ServiceBus v3.0.0
Microsoft.NET.Sdk.Functions v1.0.22
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1054 次 |
| 最近记录: |