“添加为链接"用于 Visual Studio 项目中的文件夹 [英] "Add as Link" for folders in Visual Studio projects

查看:30
本文介绍了“添加为链接"用于 Visual Studio 项目中的文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Visual Studio 中,我们可以添加为链接"来添加指向解决方案中另一个项目中文件的链接.

In Visual Studio, we can "Add as link" to add a link to a file in another project in the solution.

有没有办法对整个文件夹执行此操作,以便项目 A 中的整个文件夹在项目 B 中可见,而无需手动链接到该文件夹​​中的新项目?

Is there any way to do this for entire folders, so that an entire folder in project A will be visible in project B, without the need to manually link to new items in that folder?

推荐答案

As this 博客文章 说,这是可能的.

As this blogpost stated, it is possible.

<ItemGroup>
    <Compile Include="any_abs_or_rel_path***.*">
        <Link>%(RecursiveDir)%(FileName)%(Extension)</Link>
    </Compile>
</ItemGroup>

但请注意,文件不会被复制.

But be aware, the files will not be copied.

这篇关于“添加为链接"用于 Visual Studio 项目中的文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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