Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to "collapse" content file paths in build output in visual studio?

I'm using an open source library (log4net) that comes with LICENSE, NOTICE, and README files that are supposed to be included when you distribute it. So I want to make visual studio put them in the output directory along with my binaries.

I have log4net and its three files in a "lib\log4net" dir. The problem is if I add the files as content files, they get copied to bin\release\lib\log4net, not bin\release. Is there any way to make visual studio collapse the paths when building?

I originally used a post-build step to copy them, but then visual studio isn't aware of them and it won't put them in any other dependent project's output folder (which it will do if you call them content).

like image 610
Eggplant Jeff Avatar asked Nov 06 '22 10:11

Eggplant Jeff


2 Answers

You could use a post-build step on your project and just move them to the directory you want them in. I frequently use pre-build steps to bring in the latest versions of dependencies and post-build steps to arrange my project the way I want to deploy it.

like image 146
Jason Avatar answered Nov 14 '22 21:11

Jason


If you are using an install project to package everything, what about adding the extra files directly to that instead?

like image 39
Pedro Avatar answered Nov 14 '22 21:11

Pedro