Skip to content

Need support globs outside of the project cone #1115

@lifengl

Description

@lifengl

By default, project items outside of the project cone are not shown in the solution explorer, unless they have link metadata. To show files added through glob, the developer must add globs like this inside the project:

   <Compile Include="..\Shared\**\*.cs">
      <Link>ExternalFiles\%(RecursiveDir)\%(Filename)%(Extension)</Link>
    </Compile>

But this is hard to remember and hard to use. The idea is to create something in the .targets file, and apply Link metadata to items with metadata, so inside the project, it can be:

   <Compile Include="..\Shared\**\*.cs">
      <LinkBase>ExternalFiles</LinkBase>
    </Compile>

or

   <Compile Include="..\Shared\**\*.cs">
      <LinkBase></LinkBase>
    </Compile>

If it maps to the project root folder directly.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions