简体   繁体   中英

Referenced project's necessary files not copied to the release folder

I have a solution made out of 2 projects. One is A which is my main project and one is B . A has a reference of B in it. So when I build the entire solution, B 's .exe file is created in the release folder. But B also has reference to some .dll libraries that are also needed for the program to be working. And they do not appear in the release folder.

How can I change my build properties so that all the necessary files will be copied so I don't have to copy them manually every time?

The quick and dirty way is to manually add B 's dependencies into A 's project.

A less error prone way would be to have a single common bin folder that both projects output to. You set B to build into it and then A references the B dll from there so all the transitive dependencies are put in place just by building B .

Yet another approach would be to get B to build a Nuget package (which then describes its dependencies) and then use Nuget to add B as a package to A and it'll sort the rest out for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM