How to include your folder who is outside of project in realase output folder

Dejan Savanovic 1 Reputation point
2022-11-04T15:46:01.167+00:00

Hello,

I have a solution named Test in that solution I have Console Project named Test.CLI.
In this Solution I have folder named Test.Data.

Is there way to include this folder in realase folder when the build is created?

Developer technologies | Visual Studio | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Viorel 122.6K Reputation points
    2022-11-04T16:15:49+00:00

    If the folder contains several files that are visible in Visual Studio (or can be added to project to become visible), then select all of the files in Solution Explorer (using mouse clicks and <Shift> or <Ctrl> keys), then go to Properties, and set the "Copy to Output Directory" to "Copy if newer". The folder and files will be automatically copied.

    Or, go to Properties of a project, find options related to Post-build event (which depend on type and language of your project), and define a command like xcopy/I/E "source path" "destination path". In simplest case you can specify the full paths of the folders.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.