Ronak
Ronak

Reputation: 205

How to use app.config for multiple projects in same solution?

I have 2 projects in single solution and both should be using common app.config file. By doing web search, i came across solution => Add config using "Add as a link" option. But this option is not available in visual studio 2019.

Can someone help how to achieve this?

Solution image

Upvotes: 1

Views: 2697

Answers (1)

AKornich
AKornich

Reputation: 902

  1. Add New Solution Folder (menu item on the solution node of the Solution Explorer) called "Shared".
  2. Add/create an app.config file to the folder.
  3. For each project that needs using the app.config file, Add Existing Item -> navigate to the file location -> select the file -> press down-pointing triangle on the Add button of the item/file selection dialog and select Add as Link.

Upvotes: 3

Related Questions