Is it possible to "collapse" the path to the content file in the assembly output in visual studio?

I use the open source library (log4net) that comes with the LICENSE, NOTICE, and README files that must be included when distributing it. Therefore, I want the visual studio to put them in the output directory along with my binaries.

I have log4net and its three files in the directory "lib \ log4net". The problem is that if I add files as content files, they will be copied to bin \ release \ lib \ log4net, not bin \ release. Is there a way to make visual studio minimize paths when creating?

Initially, I used the post-build step to copy them, but then the visual studio does not know about them and will not put them in any other output folder of the dependent project (which will be done if you call them content).

+5
source share
3 answers

You can use the post-build step in your project and simply transfer them to the directory in which you want. I often use pre-build steps to use the latest dependencies and post-build steps to organize my project as I want to deploy it.

+1
source

If you are using an installation project to package everything, what add additional files to this?

+1
source

All you have to do is right-click the README file, for example, and go to properties. One of the properties is Copy to Output Directory. Set to true.

0
source

All Articles