Skip to content

Commit a533c9a

Browse files
committed
Proj0218: Symbol package format snupkg requires debug type portable
1 parent 5b7accd commit a533c9a

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ reported a the [GibHub repository](https://github.com/dotnet-project-file-analyz
116116
* [**Proj0215** Provide a compliant NuGet package icon](rules/Proj0215.md)
117117
* [**Proj0216** Define the product name explicitly](rules/Proj0216.md)
118118
* [**Proj0217** Define requiring license acceptance explicitly](rules/Proj0217.md)
119+
* [**Proj0218** Symbol package format snupkg requires debug type portable](rules/Proj0218.md)
119120
* [**Proj0240** Enable package validation](rules/Proj0240.md)
120121
* [**Proj0241** Enable package baseline validation](rules/Proj0241.md)
121122
* [**Proj0242** Generate NuGet packages conditionally](rules/Proj0242.md)

rules/Proj0218.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
parent: Packaging
3+
ancestor: Rules
4+
---
5+
6+
# Proj0218: Symbol package format snupkg requires debug type portable
7+
[When creating symbols `.snupkg` package](https://learn.microsoft.com/nuget/create-packages/symbol-packages-snupkg),
8+
having `<DebugType>` set to `full` or `pdbonly` result in an invalid `.snupkg`
9+
(or at least one that the official nuget symbol server can't process). Meanwhile
10+
`<DebugType>` value `embedded` results in the symbols being included in the
11+
regular binaries, defeating the purpose of the seperate `.snupkg`.
12+
13+
## Non-compliant
14+
``` xml
15+
<Project Sdk="Microsoft.NET.Sdk">
16+
17+
<PropertyGroup>
18+
<TargetFramework>net8.0</TargetFramework>
19+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
20+
<DebugType>embedded</DebugType>
21+
</PropertyGroup>
22+
23+
</Project>
24+
```
25+
26+
## Compliant
27+
``` xml
28+
<Project Sdk="Microsoft.NET.Sdk">
29+
30+
<PropertyGroup>
31+
<TargetFramework>net8.0</TargetFramework>
32+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
33+
<DebugType>portable</DebugType>
34+
</PropertyGroup>
35+
36+
</Project>
37+
```

0 commit comments

Comments
 (0)