Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Global config files in asp.net Core - best practice

$
0
0

My application has 9 projects/APIs running in parallel.

Today I have separate config.json files in each project. They are almost the same, all of them.

I want to use a global config.json file. 

As I see it I have two alternatives:

1. Run a postbuild script that copies the global file to all projects main catalog. Mark the copied files inside .gitignore to make them invisible for git.

2. Specify a common catalog for the solution either  with a hard coded path like "C:\myproject\commonConfig" or via an environment variable.

This path has to be set up/maintained on dev, test and prod server.

What i really want is to have a common solution catalog with links to it from all projects, but links does not exist in asp.net Core

What is the preferred way of handling common config files in asp.net Core?


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>