azure-functions-host: Metadata generation failed. Exit code: '-1073741502' Error: ''
Getting error when building a project that contains reference to <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="3.0.3" />
Is there an easy way to get more information reg. the error?
2020-10-08T08:08:06.8413744Z Done executing task "Move".
2020-10-08T08:08:06.8413995Z Task "GenerateFunctions"
2020-10-08T08:08:06.8414279Z Function generator path: 'C:\Program Files\dotnet\dotnet.exe'
2020-10-08T08:08:06.8415061Z Microsoft.NET.Sdk.Functions.Generator.dll "D:\agent3work\1548\s\Engines\Engines.Functions\obj\Debug\netcoreapp3.1\PubTmp\Out\bin\Engines.Functions.dll " "D:\agent3work\1548\s\Engines\Engines.Functions\obj\Debug\netcoreapp3.1\PubTmp\Out\ " "False "
2020-10-08T08:08:07.2199809Z Done executing task "GenerateFunctions".
2020-10-08T08:08:07.2200556Z 26:6>Done building target "_GenerateFunctionsAndCopyContentFiles" in project "Engines.Functions.csproj".
2020-10-08T08:08:07.2209104Z 26:6>Target "_GenerateFunctionsExtensionsMetadataPostPublish" in file "C:\Nuget\Packages\microsoft.azure.webjobs.script.extensionsmetadatagenerator\1.1.3\build\Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets" from project "D:\agent3work\1548\s\Engines\Engines.Functions\Engines.Functions.csproj" (target "_FunctionsPostPublish" depends on it):
2020-10-08T08:08:07.2210926Z Using "GenerateFunctionsExtensionsMetadata" task from assembly "C:\Nuget\Packages\microsoft.azure.webjobs.script.extensionsmetadatagenerator\1.1.3\build\..\tools\netstandard2.0\Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.dll".
2020-10-08T08:08:07.2211552Z Task "GenerateFunctionsExtensionsMetadata"
2020-10-08T08:08:07.2223825Z Extensions generator working directory: 'C:\Nuget\Packages\microsoft.azure.webjobs.script.extensionsmetadatagenerator\1.1.3\tools\netstandard2.0\..\netstandard2.0\generator'
2020-10-08T08:08:07.2225792Z Extensions generator path: 'C:\Program Files\dotnet\dotnet.exe'
2020-10-08T08:08:07.2227810Z Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.Console.dll "D:\agent3work\1548\s\Engines\Engines.Functions\obj\Debug\netcoreapp3.1\PubTmp\Out\bin" "D:\agent3work\1548\s\Engines\Engines.Functions\obj\Debug\netcoreapp3.1\PubTmp\Out\bin\extensions.json"
2020-10-08T08:08:07.2267963Z Debug output from extension.json generator:
2020-10-08T08:08:07.2271291Z
2020-10-08T08:08:07.2558738Z ##[error]C:\Nuget\Packages\microsoft.azure.webjobs.script.extensionsmetadatagenerator\1.1.3\build\Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets(52,5): Error : Metadata generation failed. Exit code: '-1073741502' Error: ''
2020-10-08T08:08:07.2571820Z 26:6>C:\Nuget\Packages\microsoft.azure.webjobs.script.extensionsmetadatagenerator\1.1.3\build\Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets(52,5): error : Metadata generation failed. Exit code: '-1073741502' Error: '' [D:\agent3work\1548\s\Engines\Engines.Functions\Engines.Functions.csproj]
2020-10-08T08:08:07.2572978Z Done executing task "GenerateFunctionsExtensionsMetadata" -- FAILED.
2020-10-08T08:08:07.2573559Z 26:6>Done building target "_GenerateFunctionsExtensionsMetadataPostPublish" in project "Engines.Functions.csproj" -- FAILED.
2020-10-08T08:08:07.2574321Z 26:6>Done Building Project "D:\agent3work\1548\s\Engines\Engines.Functions\Engines.Functions.csproj" (default targets) -- FAILED.
2020-10-08T08:08:07.2574876Z 37:13>Done executing task "MSBuild".
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 5
- Comments: 23 (2 by maintainers)
Seems to be working now… Updated to Microsoft.NET.Sdk.Functions 3.0.13 However, our build server (Jenkins on windows server) was also patched with framework updates (via standard windows updates) So cannot be sure as to which fixed the issue for us.
FWIW we are also experiencing this exact same problem (and have been for several months). We’re on Microsoft.NET.Sdk.Functions 3.0.11, building on Azure Pipelines with local agents hosted on Azure VMs via
dotnet build
(notdotnet publish
), and intermittently get the following:Like others have reported, it seems highly correlated with multiple concurrent builds. We almost never (maybe actually never) see the problem when one build is executing. When two builds are executing on the same build server it seems to happen frequently.
Any news on this? I am getting the same error but with extensionsmetadatagenerator 1.1.8 and with Microsoft.NET.Sdk.Functions 3.0.9
[error]C:\Windows\ServiceProfiles\NetworkService\.nuget\packages\microsoft.azure.webjobs.script.extensionsmetadatagenerator\1.1.8\build\Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets(37,5): Error : Metadata generation failed. Exit code: '-1073741502' Error: ''
.I am getting this on my Azure Devops build pipeline and very sporadic och sudden. Using the clean option on the pipeline doesn´t help, This started to appear like a week ago. Sometimes after waiting a while, triggering a new build it would succeed.
I am confirming that we started getting this issue on our Jenkins build servers. Two branches that contained the same code were providing inconsistent results. One was building fine whereas the other one had the error stated in this chain. I tried restarting Jenkins but had the same issue. Finally, after upgrading Microsoft.NET.Sdk.Functions from 3.0.11 to 3.0.13 it got resolved. Hope this helps some folks out there.
this fixed my issue:
To uninstall dotnet core from macOS:
download dotnet-uninstall-pkgs.sh from https://github.com/dotnet/sdk/blob/main/scripts/obtain/uninstall/dotnet-uninstall-pkgs.sh make dotnet-uninstall-pkgs.sh executable execute dotnet-uninstall-pkgs.sh as root (requires superuser privileges to run). curl -O https://raw.githubusercontent.com/dotnet/sdk/main/scripts/obtain/uninstall/dotnet-uninstall-pkgs.sh chmod u+x dotnet-uninstall-pkgs.sh sudo ./dotnet-uninstall-pkgs.sh
basically uninstalling dotnet
Linking my issue here in case the two are related, or in case my resolution helps anybody else:
#7071