visual-studiovisual-studio-2010projects-and-solutions

"Add as Link" for folders in Visual Studio projects


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

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?


Solution

  • 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.