Azure / Azure/azure-functions-host

[v1] Build Hangs in ExtensionsMetadataGenerator

Open
#8,401 6 comments 1 reaction 0 assignees View on GitHub
Needs: Triage (Functions)
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

Consider the following project file:

``` xml


net48
v1






```

Attempting to build this project file will never complete.

From a DevOps pipeline this manifests as
> The nuget command failed with exit code(1) and error(MsBuild timeout out while trying to get project to project references

The profiler indicates getting stuck in Mono.Cecil:

![image](https://user-images.githubusercontent.com/12844147/168949622-206456f5-0826-442b-886f-4060d743a6ac.png)

The previous version of `Microsoft.NET.Sdk.Functions`, version 1.0.37, completely imperceptibly quickly. Version 1.0.38 switched to `Mono.Cecil` (PR #6052), which seems like the likely culprit.

Presumably there's something in [`PnP.Framework`](https://github.com/pnp/pnpframework) that the generator doesn't like, but I couldn't spot it.

All the way back to `PnP.Framework` 1.0 triggers this issue, but the last version of the predecessor package, [`SharePointPnPCoreOnline`](https://www.nuget.org/packages/SharePointPnPCoreOnline) ([3.28.2012](https://www.nuget.org/packages/SharePointPnPCoreOnline/3.28.2012)), does not.

Tested in Visual Studio 2022 Version 17.2.1.

Contributor guide

Open the contributing guide

Research direction

Reproduce the hang with the provided net48 project and compare Microsoft.NET.Sdk.Functions 1.0.37 with 1.0.38. Then inspect ExtensionsMetadataGenerator, the Mono.Cecil path, and PR #6052; done means the sample build completes rather than timing out, including with PnP.Framework.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.