How to include debugging symbols to .vsix package
Asked Answered
C

1

7

I have written visual studio extension for private use. The package is still under development but I would like to use it and distribute it to my colleagues. Is it possible to include debugging symbols (.pdb) to .vsix package? I prefer a Visual Studio or Project setting to the package editing.

Crankpin answered 25/9, 2013 at 14:39 Comment(0)
S
9

There's no setting for it within the VS UI, but you can edit your .csproj or .vbproj file to change it. If you open the .csproj file in notepad, either update or add this under a <PropertyGroup>

<IncludeDebugSymbolsInVSIXContainer>true</IncludeDebugSymbolsInVSIXContainer>

You probably want to add this under your "debug" PropertyGroup so that way it gets included in debug builds but not release ones you might stick somewhere public. If you have project references that get added to the VSIX, go to the <ProjectReference> node in your project file and look for:

<IncludeOutputGroupsInVSIX>BuiltProjectOutputGroup%3bBuiltProjectOutputGroupDependencies%3bGetCopyToOutputDirectoryItems%3b</IncludeOutputGroupsInVSIX>
<IncludeOutputGroupsInVSIXLocalOnly>DebugSymbolsProjectOutputGroup%3b</IncludeOutputGroupsInVSIXLocalOnly>

The first line is the output groups that get included in the VSIX, and the second is what gets copied locally when you hit F5. Tweak the groups as expected, where the %3b is the escaped form of a ; and is the delimiter here.

Sylph answered 26/9, 2013 at 3:5 Comment(3)
I have added <IncludeDebugSymbolsInVSIXContainer> to <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> and it works. THXCrankpin
I have manually copied and pasted this under the <ProjectReference ...> node in my csproj file. However, it still doesn't seem to be copying the PDB for a dependency... I've also tried setting all the properties here to true, too, but no luck. I wonder if it's because my VSIX is dependent on a .NET Standard library.Dower
What about PDBs of referenced nuget packages? How do I include them into VSIX?Expugnable

© 2022 - 2024 — McMap. All rights reserved.