Azure / Azure/azure-functions-core-tools

ADO build for Azure Function pipeline build fails - local.settings.json not found

Open
#2,252 6 comments 4 reactions 0 assignees View on GitHub
Needs: Attention :wave:
Dominant language
C#
Stars
1.5k
Forks
498
Avg merge
4d 20h
Merged PRs (30d)
14

Description

Because local.settings.json is filtered by .gitignore it does not exist in the repository. But there is a reference to local.settings.json in the Function .csproj file. No problem locally, the file exists per template. But Azure DevOps pipeline builds fail. ('Error MSB3030 Could not copy the file...')

We solved this problem by adding a command task in the pipeline and emitting an empty local.settings.json file. This seems weird to have to do that and I can't find any discussion of this issue.

What is the recommended guidance to avoid this issue?

Contributor guide

Open the contributing guide

Research direction

Start by inspecting the Function .csproj reference to local.settings.json and the Azure DevOps pipeline command that creates the empty file, then reproduce the failing build. Done means the recommended guidance for handling the ignored settings file is established and the pipeline behavior is verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
build-system, ci-cd, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.