Skip to content

Commit 1270a76

Browse files
author
Ruslan Shupoval
committed
move SourceLink configuration from Directory.Build.prop into csproj;
disable SourceLink by default;
1 parent 9903036 commit 1270a76

File tree

5 files changed

+7
-13
lines changed

5 files changed

+7
-13
lines changed

Build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ foreach ($src in ls src/*) {
2323

2424
echo "build: Packaging project in $src"
2525

26-
& dotnet build -c Release --version-suffix=$buildSuffix
26+
& dotnet build -c Release --version-suffix=$buildSuffix -p:EnableSourceLink=true
2727
if ($suffix) {
2828
& dotnet pack -c Release -o ..\..\artifacts --version-suffix=$suffix --no-build
2929
} else {

Directory.Build.props

Lines changed: 0 additions & 10 deletions
This file was deleted.

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ dotnet --info
33
dotnet restore
44

55
for path in src/**/*.csproj; do
6-
dotnet build -f netstandard1.3 -c Release ${path}
6+
dotnet build -f netstandard1.3 -c Release ${path} -p:EnableSourceLink=true
77
done
88

99
for path in test/*.Tests/*.csproj; do

serilog-sinks-file.sln

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "assets", "assets", "{E9D1B5
1212
appveyor.yml = appveyor.yml
1313
Build.ps1 = Build.ps1
1414
build.sh = build.sh
15-
Directory.Build.props = Directory.Build.props
1615
NuGet.Config = NuGet.Config
1716
README.md = README.md
1817
assets\Serilog.snk = assets\Serilog.snk

src/Serilog.Sinks.File/Serilog.Sinks.File.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,14 @@
2323
<AssemblyName>Serilog.Sinks.File</AssemblyName>
2424
<!-- Don't reference the full NETStandard.Library -->
2525
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
26+
<!-- SourceLink configuration -->
27+
<EnableSourceLink Condition="'$(EnableSourceLink)' == ''">false</EnableSourceLink>
28+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
29+
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
2630
</PropertyGroup>
2731

2832
<ItemGroup>
33+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta-63127-02" PrivateAssets="All"/>
2934
<PackageReference Include="Serilog" Version="2.5.0" />
3035
</ItemGroup>
3136

0 commit comments

Comments
 (0)