Skip to content

Commit e4b3718

Browse files
committed
Add sourcelink to nuget package
1 parent 532fd1b commit e4b3718

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

Build.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ foreach ($src in ls src/*) {
2121
echo "build: Packaging project in $src"
2222

2323
if($suffix) {
24-
& dotnet pack -c Release --include-source -o ..\..\artifacts --version-suffix=$suffix
24+
& dotnet pack -c Release -o ..\..\artifacts --version-suffix=$suffix
2525
} else {
26-
& dotnet pack -c Release --include-source -o ..\..\artifacts
26+
& dotnet pack -c Release -o ..\..\artifacts
2727
}
2828

2929
if($LASTEXITCODE -ne 0) { exit 1 }

src/Serilog.AspNetCore/Serilog.AspNetCore.csproj

+12
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@
2020
<RootNamespace>Serilog</RootNamespace>
2121
</PropertyGroup>
2222

23+
<PropertyGroup>
24+
<IncludeSymbols>true</IncludeSymbols>
25+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
26+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
27+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
28+
<IsPackable>true</IsPackable>
29+
</PropertyGroup>
30+
2331
<ItemGroup>
2432
<None Include="..\..\assets\icon.png" Pack="true" Visible="false" PackagePath="" />
2533
</ItemGroup>
@@ -36,6 +44,10 @@
3644
<PackageReference Include="Serilog.Sinks.Debug" Version="2.0.0" />
3745
<PackageReference Include="Serilog.Settings.Configuration" Version="3.3.0" />
3846
<PackageReference Include="Serilog.Formatting.Compact" Version="1.1.0" />
47+
<PackageReference Include="Microsoft.SourceLink.Github" Version="1.1.1">
48+
<PrivateAssets>all</PrivateAssets>
49+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
50+
</PackageReference>
3951
</ItemGroup>
4052

4153
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">

0 commit comments

Comments
 (0)