A
A
Alexander2016-06-08 07:53:31
ASP.NET
Alexander, 2016-06-08 07:53:31

External configurations of the appSettings section?

Hello.
There is an asp.net mvc application that has an external file file="CommonSettings.config" specified in the web.config for the appSettings section. This file is in a separate library and added as a link to the project with the web application (the properties BuildAction="Content" and Copy to Output Directory="Copy always" are set on the link).
If you run the application in debug, then CommonSettings.config is copied to the bin\Debug folder, but it is not in the root folder of the application (where Web.config is located).
How can I make this file copied to the root of the application?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kronic, 2016-06-08
@Papagatto

Try doing the following:

  1. Opening the Project Property
  2. Go to the Build Events tab
  3. In the Post-build event add the line
    copy $(SolutionDir)ProjectName\CommonSettings.config $(ProjectDir)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question