Skip to content

Commit 1f0a2d3

Browse files
authored
Merge pull request #980 from CommunityToolkit/dev/embedded-roslyn-pdbs
Embed .pdb files for all analyzer projects
2 parents 77ede78 + a285a1e commit 1f0a2d3

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/CommunityToolkit.Mvvm.CodeFixers/CommunityToolkit.Mvvm.CodeFixers.props

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
<TargetFramework>netstandard2.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
7+
8+
<!-- Embed the .pdb file (see notes in the MVVM Toolkit generator projects) -->
9+
<DebugType>embedded</DebugType>
710
</PropertyGroup>
811

912
<!-- Simplified version of the same props as the source generators -->

src/CommunityToolkit.Mvvm.SourceGenerators/CommunityToolkit.Mvvm.SourceGenerators.props

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@
44
<TargetFramework>netstandard2.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
7+
8+
<!--
9+
While this project does not produce a .dll that consuming projects execute at runtime, we still want to
10+
include debugging information, to make it easier to debug the generator themselves in case of issues.
11+
Rather than using portable .pdb files, we just embed them, to ensure debuggers will load them correctly.
12+
Using portable .pdb-s results in Visual Studio not automatically loading them when attaching a debugger
13+
to the Roslyn code analysis process to try to debug the generators, forcing to pick the path manually.
14+
-->
15+
<DebugType>embedded</DebugType>
716
</PropertyGroup>
817

918
<!--

0 commit comments

Comments
 (0)