Skip to content

Isolated Azure Functions build is broken when using artifacts layout #2659

@JDamascenoMS

Description

@JDamascenoMS

[Original FT from DevDiv] (https://dev.azure.com/devdiv/DevDiv/_workitems/edit/2674575)
When Isolated Azure Functions projects are combined with artifacts layout the build is broken.

Create a solution with at least two Isolated Azure Functions projects.

Add Directory.Build.props that enables artifacts output.

Build the solution from command line:

dotnet build --artifacts-path <some_path>

Build randomly fails with

Cannot open '_artifacts1\obj\WorkerExtensions\release\Microsoft.Azure.Functions.Worker.Extensions.dll' for writing -- The process cannot access the file '_artifacts1\obj\WorkerExtensions\release\Microsoft.Azure.Functions.Worker.Extensions.dll' because it is being used by another process.

The problem is due to WorkerExtensions.csproj projects generated by functions build process output to the same locations:

<artifacts_path>\bin\WorkerExtensions
<artifacts_path>\obj\WorkerExtensions

See attached AzureFunctions.zip sample solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions