Skip to content

Commit

Permalink
Add sourcelink to nuget package
Browse files Browse the repository at this point in the history
  • Loading branch information
dakhraui committed May 19, 2022
1 parent 532fd1b commit e4b3718
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ foreach ($src in ls src/*) {
echo "build: Packaging project in $src"

if($suffix) {
& dotnet pack -c Release --include-source -o ..\..\artifacts --version-suffix=$suffix
& dotnet pack -c Release -o ..\..\artifacts --version-suffix=$suffix
} else {
& dotnet pack -c Release --include-source -o ..\..\artifacts
& dotnet pack -c Release -o ..\..\artifacts
}

if($LASTEXITCODE -ne 0) { exit 1 }
Expand Down
12 changes: 12 additions & 0 deletions src/Serilog.AspNetCore/Serilog.AspNetCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@
<RootNamespace>Serilog</RootNamespace>
</PropertyGroup>

<PropertyGroup>
<IncludeSymbols>true</IncludeSymbols>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
<None Include="..\..\assets\icon.png" Pack="true" Visible="false" PackagePath="" />
</ItemGroup>
Expand All @@ -36,6 +44,10 @@
<PackageReference Include="Serilog.Sinks.Debug" Version="2.0.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="3.3.0" />
<PackageReference Include="Serilog.Formatting.Compact" Version="1.1.0" />
<PackageReference Include="Microsoft.SourceLink.Github" Version="1.1.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

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

0 comments on commit e4b3718

Please sign in to comment.