Azure / Azure/azure-functions-host
Metadata generation failed. Exit code: '255'
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 38
Description
I have a build server running several self-hosted Azure build agents. I queue a build for a large solution, using 4 agents across 6 jobs. The solution contains one Functions project, targeting netcoreapp3.1. The functions project includes the following packages:
```
```
The project builds and tests fine on the build server, however the publish task sporadically fails with this error:
`1C:\Windows\ServiceProfiles\NetworkService\.nuget\packages\microsoft.azure.webjobs.script.extensionsmetadatagenerator\1.2.0\build\Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets(37,5): error : Metadata generation failed. Exit code: '255' Error: ''`
Running the publish task manually on the server never fails, and using an Azure shared build agent never fails.
I have been trying to solve this for about week or so. There are a few issues reported here that have similar error messages, but the exit code in my case is not something I have seen elsewhere. I have run the publish task with the `-v d` switch if I can upload or send that output to someone.
I am opening this ticket for the teams attention, and also to mention that I have solved the problem by creating separate Windows accounts for each build agent, which leads me to believe the issue lies with a shared Nuget cache.
Contributor guide
Research direction
Start with Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets at the reported NuGet package path and the netcoreapp3.1 Functions project using Microsoft.NET.Sdk.Functions. Reproduce the publish across multiple self-hosted agents, compare it with a shared agent and separate Windows accounts, and review the available -v d output. Done means the shared-cache or agent interaction is isolated and a verified resolution is identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp
- Domain
- build-system, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100