visual-studio-extensionsvsixvsixmanifest

VSIX - How to include XML documentation files in package?


I've found the following article that nicely describes how PDB files of project references can be included in the VSIX package: http://www.cazzulino.com/include-pdbs-in-vsix.html.

Now I would like to do the same, but for documentation XML files that are generated by project references. I see that the XML files are already copied to the output directory of the VSIX project, but how can I make sure that they are added to the .VSIX file as well?


Solution

  • Answering my own question:

    Apparently there is also a "DocumentationProjectOutputGroup" output group. This output group can then be added to all project references in the following way:

    <PropertyGroup>
        <DefaultIncludeOutputGroupsInVSIX>
            BuiltProjectOutputGroup;
            DebugSymbolsProjectOutputGroup;
            GetCopyToOutputDirectoryItems;
            SatelliteDllsProjectOutputGroup;
            BuiltProjectOutputGroupDependencies;
            DocumentationProjectOutputGroup;
            SatelliteDllsProjectOutputGroupDependencies
        </DefaultIncludeOutputGroupsInVSIX>
    </PropertyGroup>
    
    <ItemDefinitionGroup>
        <ProjectReference>
            <IncludeOutputGroupsInVSIX>$(DefaultIncludeOutputGroupsInVSIX)</IncludeOutputGroupsInVSIX>
        </ProjectReference>
    </ItemDefinitionGroup>