-
Notifications
You must be signed in to change notification settings - Fork 458
Function.json generation failed (MetaGeneration) #5786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
If it can help, I analyzed the reason and after debugging with Mono.Cecil, the bin project directory contains the missed assembly in version 1.1.5 but not in 1.1.6. After patching the Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets by reverting the AfterTargets attribute from Build to _GenerateFunctionsPostBuild (Line 42, Target named _GenerateFunctionsExtensionsMetadataPostBuild), the assembly is available and Mono.Cecil finds the assembly. Hi @brettsam, the targets fix (f987062) causes a potential regression here. How can I help to solve this problem ? |
Can you share your project file? This is a known issue with 1.1.6 if you're directly referencing ExtensionsMetadataGenerator. but that should be very rare (there's no need to directly reference; the Sdk references it for you). |
Hi @brettsam, first of all, thank you for your quick reply, I appreciate it. I am not using directly this reference, I only reference the main package Microsoft.NET.Sdk.Functions. The problem appears when you update the package, all inter dependencies are updated and the version 1.1.6 of the package Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator is used. When you say it is a well known issue of the 1.1.6, would it be possible to have the issue number please so that we can contribute too ? |
I'm not seeing this when I use 3.0.5 -- would you still mind sharing your csproj file so I can try to repro this? It's a known issue in the sense that I called it out during my commit to 1.1.6 -- we were having bigger issues so I thought that this was an okay risk for now (not assuming anyone using the Sdk would hit 1.1.6 unless they added a direct ref). So let's use this issue as the tracking item for that. |
Here is the repo where you can reproduce the problem : https://github.com/cboudereau/azurefunctionsample I added the workaround in comments to quickly analyse the main differences between both versions |
Check for a solution in the Azure portal
After updating the Microsoft.NET.Sdk.Functions to 3.0.5 cleaning then building the project, an error occurs. I think the issue is connected to #4390 :
Investigative information
Function App version : V3, dotnet core 3.1
Repro steps
Expected behavior
Expected the function.json without msbuild errors.
Actual behavior
A build error is displayed :
Known workarounds
Pin the version of the Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator package to 1.1.5
The text was updated successfully, but these errors were encountered: