Visual Studio: common and customized part in configuration file

29 Views Asked by At

I have two projects 'A', 'B' and a third project 'Common'.

Project A and B are similar, but not completely the same. For instance, they will have a few parameters that are exactly the same, and a few others that are different.

Is it possible to put a configuration file with the sections that are exactly the same in the 'Common' project, and load this configuration file in both Project A and B. After loading this common configuration file, I want to add customized parts to the configuration file.

1

There are 1 best solutions below

1
On

Let's say you have this folder structure:

Solution

  • Project1
  • Project2

Create the App.config file in the Solution level folder. In each project in Solution Explorer, right click and select Add Existing File. Locate the file, and select Add as link from the drop down box next to the Add button.