5

Using Visual Studio 2022, I connected to a remote Azure App Services so I should be able to debug locally. After connecting, I saw that there were some auto generated files specifically under

  • new folder Properties/ServiceDependencies
  • new file Properties/serviceDependencies.json
  • new file Properties/serviceDependencies.local.json

I'm not exactly sure why these files were added, but my question is, are these files needed just locally and should be ignored by source control?

6
  • Specific to your local development environment, should be ignored by source control. Commented Oct 24, 2023 at 18:17
  • thank you, any refrence docs for this? Commented Oct 24, 2023 at 18:37
  • 1
    Configuring Azure Services and emulators using Visual Studio Commented Oct 24, 2023 at 18:50
  • 1
    Good to know: .env, .env.development, and .env.production files should be included in your repository as they define defaults. .env*.local should be added to .gitignore, as those files are intended to be ignored. .env.local is where secrets can be stored. Default Environment Variables Commented Oct 24, 2023 at 18:56
  • 1
    u might as well put all this in an official answer ill mark it as correct Commented Oct 24, 2023 at 20:45

1 Answer 1

5

The created documents and there settings are explained in the following devblog Configuring Azure Services and emulators using Visual Studio:

To support all of this Visual Studio creates two new files visible in Solution Explorer under Properties called serviceDependencies.json and serviceDependencies.local.json. Both of these files are safe to check in as they do not contain any secrets.

In general, local development environment are in every kind of projects a candidate for "should be ignored by source control", like described here Default Environment Variables:

Good to know: .env, .env.development, and .env.production files should be included in your repository as they define defaults. .env*.local should be added to .gitignore, as those files are intended to be ignored. .env.local is where secrets can be stored.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.