How to create a Visual Studio project file to copy indirect links?

enter image description here

As the screenshot shows, ClassLibrary1 relies on ClassLibrary2 and ClassLibrary2 relies on ClassLibrary3. And Copy Local is set to True. But when I compile ClassLibrary1, ClassLibrary3 will not be copied to the bin folder.

So, how can I customize the Visual Studio project file to copy indirect links?

+8
reference visual-studio-2010
source share
2 answers

I do not think that's possible.

If you want indirect links to be copied locally, you will need to add a direct link to them for each project that you want them to be in.

If you try to create a project using MSBuild, you will probably be informed that there is no indirect dependency; Visual Studio usually ignores missing indirect dependencies if you are not directly using any of them.

+4
source share

This question has already been asked here .

@competent_tech is correct as this is not possible in Visual Studio. However, Alex Yakunin solved his problem with the custom goal of MSBuild .

0
source share

All Articles