azure-functions-dotnet-worker: Regression in `Microsoft.Azure.Functions.Worker.Sdk` version `1.17.4`/`1.17.3` of solution builds using no-incremental

Description

Microsoft.Azure.Functions.Worker.Sdk version 1.17.4/1.17.3 breaks solution builds using no-incremental.

This is a regression of: https://github.com/Azure/azure-functions-dotnet-worker/issues/2284

Description

Building a solution with flag --no-incremental while having a test project referencing a functions project will result in the build failing with MSB3030: Could not copy the file "obj\Debug\net8.0\extensions.json" because it was not found.

Steps to reproduce

  1. Create a solution with a new functions project
    • Functions worker: .NET 8.0 Isolated
    • Function: Empty
  2. Add a xunit test project
  3. Add a project reference in the test project targeting the functions project
  4. Use Microsoft.Azure.Functions.Worker.Sdk 1.17.0
  5. build with: dotnet build --no-incremental solution.sln

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 4
  • Comments: 15 (3 by maintainers)

Most upvoted comments

Request that this be re-opened. Per the External Extension Project readme added in #2954:

To accommodate these conflicts SDK 2.1.0 and on supports the ability to externally supply this extension project, giving full control of the extension project to the customer.

This issue exists until v2.1.0 or a preview of it is released to NuGet.

Still an issue in 1.18.0 and 1.18.1. Can the next release please include a fix for this?

Can confirm, the issue is fixed for me when running version 2.0.3

This one prevents Functions for .Net 9 cuz you need to upgrade Microsoft.Azure.Functions.Worker.Sdk to 2.0.0

Same issue here, confirming that it is only on a clean/re build. This will cause problems in our CICD pipeline… 😦

The issue appears to be with MSBuild parallelization. We are still investigating, but a potential workaround is to provide max cpu count of 1: dotnet build --no-incremental -m:1