Symbols package fixed

This commit is contained in:
Vladimir Enchev
2026-01-08 10:48:34 +02:00
parent d6235fd147
commit 40e15a0720
3 changed files with 35 additions and 2 deletions

View File

@@ -49,7 +49,19 @@
<!-- Embed source files for better debugging -->
<EmbedAllSources>true</EmbedAllSources>
<DebugType>embedded</DebugType>
<!--
IMPORTANT:
- NuGet symbol packages (.snupkg) require portable PDB files.
- If DebugType=embedded, there are no standalone PDBs, so the .snupkg ends up effectively empty.
Use portable PDBs when symbols are enabled; otherwise use embedded for local debugging convenience.
-->
<!--
NOTE: Directory.Build.props is imported before project files, so properties like IncludeSymbols
set in a .csproj may not be available yet for Conditions here.
IsPacking *is* set by `dotnet pack`, so use that to switch DebugType for symbol packages.
-->
<DebugType Condition="'$(IsPacking)' == 'true'">portable</DebugType>
<DebugType Condition="'$(IsPacking)' != 'true'">embedded</DebugType>
</PropertyGroup>
<PropertyGroup Label="Demos and Tests Project Configuration" Condition="$(MSBuildProjectName.Contains('Demos')) OR $(MSBuildProjectName.Contains('Tests'))">

View File

@@ -49,7 +49,19 @@
<!-- Embed source files for better debugging -->
<EmbedAllSources>true</EmbedAllSources>
<DebugType>embedded</DebugType>
<!--
IMPORTANT:
- NuGet symbol packages (.snupkg) require portable PDB files.
- If DebugType=embedded, there are no standalone PDBs, so the .snupkg ends up effectively empty.
Use portable PDBs when symbols are enabled; otherwise use embedded for local debugging convenience.
-->
<!--
NOTE: Directory.Build.props is imported before project files, so properties like IncludeSymbols
set in a .csproj may not be available yet for Conditions here.
IsPacking *is* set by `dotnet pack`, so use that to switch DebugType for symbol packages.
-->
<DebugType Condition="'$(IsPacking)' == 'true'">portable</DebugType>
<DebugType Condition="'$(IsPacking)' != 'true'">embedded</DebugType>
</PropertyGroup>
<PropertyGroup Label="Demos and Tests Project Configuration" Condition="$(MSBuildProjectName.Contains('Demos')) OR $(MSBuildProjectName.Contains('Tests'))">

View File

@@ -25,6 +25,15 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<!--
NuGet symbol packages (.snupkg) require portable PDB files.
Directory.Build.props in this repo uses DebugType=embedded by default, which produces no .pdb files and results
in an effectively empty .snupkg. Force portable PDBs for Release/packing.
-->
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<DebugType>portable</DebugType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="DartSassBuilder" Version="1.1.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.AspNetCore.Components" Condition="'$(TargetFramework)' == 'net6.0'" Version="6.0.25" />