Own item type for a project node

Sergei 1 Reputation point
2022-02-06T11:33:40.323+00:00

Hello!

EnvDTE namespace has ProjectItems class. It has AddFolder method. With it, we can create a physical folder (for a C# project):

var projectItem=projectItems.AddFolder("FolderName", VSConstants.ItemTypeGuid.PhysicalFolder_string);

Or a virtual folder (for a C++ project):

var projectItem=projectItems.AddFolder("FilterName", VSConstants.ItemTypeGuid.VirtualFolder_string);

But we cannot create a physical folder for a C++ project. Is it possible to create my own type somehow? Say, duplicating the filter for C++ projects (exactly the same function), just so that it has a different identifier and is displayed with a different icon (collapsed and expanded).

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,245 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anna Xiu-MSFT 25,626 Reputation points Microsoft Vendor
    2022-02-10T09:56:54.147+00:00

    Hello,

    Based on my knowledge, I suppose it is impossible.

    Sincerely,
    Anna
    *
    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments