Errors show up after adding a Blob trigger function on Azure Function V2 Project with "Microsoft.NET.Sdk.Functions" verison 1.0.21 : "Metadata generation failed.".
See original GitHub issueWith latest 15.9 preview:
- File > New Project > Azure Functions >Azure Functions v2 (.Net Core) with Empty template + Storage Emulator selected. 2.Open Manage Nuget Packages to update the “Microsoft.NET.Sdk.Functions” verison to 1.0.21
- Right click project -> Add New Item-> New Azure Function… 4.Select the Blob trigger function and set the connection to “AzureWebJobsStorage”.Click OK.
- Build.
Then, errors shows up in the error list.
ACTUAL
Severity | Code | Description | Project | File | Line | Suppression State |
---|---|---|---|---|---|---|
Error | System.IO.FileNotFoundException: Could not load file or assembly ‘Microsoft.Azure.WebJobs, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The system cannot find the file specified.File name: ‘Microsoft.Azure.WebJobs, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null’ at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type) at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) at 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) at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeParameterInfo parameter, RuntimeType caType) at System.Attribute.InternalParamGetCustomAttributes(ParameterInfo param, Type type, Boolean inherit) at MakeFunctionJson.ParameterInfoExtensions.GetDisabledAttribute(ParameterInfo parameterInfo) at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Linq.Enumerable.WhereEnumerableIterator 1.MoveNext() at System.Linq.Enumerable.FirstOrDefault[TSource](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.List 1…ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable 1 source) at MakeFunctionJson.FunctionJsonConverter.TryGenerateFunctionJsons() at MakeFunctionJson.FunctionJsonConverter.TryRun()WRN: Assembly binding logging is turned OFF.To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.Note: There is some performance penalty associated with assembly bind failure logging.To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].Error generating functions metadata |
FunctionApp6 | C:\Users\v-lingyx.nuget\packages\microsoft.net.sdk.functions\1.0.21\build\netstandard1.0\Microsoft.NET.Sdk.Functions.Build.targets | 39 | ||
Error | Metadata generation failed. | FunctionApp6 | C:\Users\v-lingyx.nuget\packages\microsoft.net.sdk.functions\1.0.21\build\netstandard1.0\Microsoft.NET.Sdk.Functions.Build.targets | 39 |
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:6
Top Results From Across the Web
Getting "Metadata generation failed" when building C# ...
Hi! I got the same error. But I'm failed when I typed "C:\Users\myname\.nuget\packages\microsoft.net.sdk.functions\1.0.29\build\netstandard1.0 .
Read more >How to fix the below blob trigger and function app
Getting the below error when I trigger function app when there is change in the blob. Any idea what is the issue.
Read more >Azure Functions quit building with error after upgrading ...
My Azure functions target x64 specifically due to some native dependencies. I have one that targets v1 (due to a Framework dependency) and ......
Read more >Azure Blob storage trigger for Azure Functions
The following example shows a C# function that writes a log when a blob is added or updated in the samples-workitems container.
Read more >i have created the function app using .net 5
i have created the function app using .net 5 and when i run the function app i get the above error as you...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have the same issue. Switching back to Microsoft.NET.Sdk.Function v1.0.22 fixed for me.
Should have been fixed in 1.0.24, issue can be closed.