如何使Visual Studio项目文件复制间接引用? [英] how to make a Visual Studio project file to copy indirect references?

查看:60
本文介绍了如何使Visual Studio项目文件复制间接引用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如屏幕截图所示,ClassLibrary1依赖于ClassLibrary2,而ClassLibrary2依赖于ClassLibrary3.并且本地复制"设置为真".但是当我编译ClassLibrary1时,ClassLibrary3不会被复制到bin文件夹中.

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

那么我如何配置Visual Studio项目文件以使其复制间接引用?

So how can I config the Visual Studio project file to make it copy indirect references?

推荐答案

我认为这是不可能的.

如果要将间接引用复制到本地,则必须将直接引用添加到要包含在它们中的每个项目中.

If you want the indirect references to be copied locally, you will have to add a direct reference to them to each project that you want them to be in.

如果尝试使用MSBuild生成项目,则可能会通知您缺少间接依赖关系.如果您不直接使用间接依赖项中的任何内容,Visual Studio通常会忽略它们.

If you try to build the project using MSBuild you will probably be informed that the indirect dependency is missing; Visual Studio usually ignores the missing indirect dependencies if you aren't directly using anything from them.

这篇关于如何使Visual Studio项目文件复制间接引用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆