Skip to content

Commit 7d45daf

Browse files
committed
Convert to VS2017 tooling
1 parent 831860c commit 7d45daf

File tree

9 files changed

+88
-140
lines changed

9 files changed

+88
-140
lines changed

Build.ps1

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,38 +12,42 @@ if(Test-Path .\artifacts) {
1212
$branch = @{ $true = $env:APPVEYOR_REPO_BRANCH; $false = $(git symbolic-ref --short -q HEAD) }[$env:APPVEYOR_REPO_BRANCH -ne $NULL];
1313
$revision = @{ $true = "{0:00000}" -f [convert]::ToInt32("0" + $env:APPVEYOR_BUILD_NUMBER, 10); $false = "local" }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL];
1414
$suffix = @{ $true = ""; $false = "$($branch.Substring(0, [math]::Min(10,$branch.Length)))-$revision"}[$branch -eq "master" -and $revision -ne "local"]
15+
$commitHash = $(git rev-parse --short HEAD)
16+
$buildSuffix = @{ $true = "$($suffix)-$($commitHash)"; $false = "$($branch)-$($commitHash)" }[$suffix -ne ""]
1517

16-
echo "build: Version suffix is $suffix"
18+
echo "build: Package version suffix is $suffix"
19+
echo "build: Build version suffix is $buildSuffix"
1720

1821
foreach ($src in ls src/*) {
1922
Push-Location $src
2023

2124
echo "build: Packaging project in $src"
2225

23-
& dotnet pack -c Release -o ..\..\artifacts --version-suffix=$suffix
26+
& dotnet build -c Release --version-suffix=$buildSuffix
27+
& dotnet pack -c Release --include-symbols -o ..\..\artifacts --version-suffix=$suffix --no-build
2428
if($LASTEXITCODE -ne 0) { exit 1 }
2529

2630
Pop-Location
2731
}
2832

29-
foreach ($test in ls test/*.PerformanceTests) {
33+
foreach ($test in ls test/*.Tests) {
3034
Push-Location $test
3135

32-
echo "build: Building performance test project in $test"
36+
echo "build: Testing project in $test"
3337

34-
& dotnet build -c Release
35-
if($LASTEXITCODE -ne 0) { exit 2 }
38+
& dotnet test -c Release
39+
if($LASTEXITCODE -ne 0) { exit 3 }
3640

3741
Pop-Location
3842
}
3943

40-
foreach ($test in ls test/*.Tests) {
44+
foreach ($test in ls test/*.PerformanceTests) {
4145
Push-Location $test
4246

43-
echo "build: Testing project in $test"
47+
echo "build: Building performance test project in $test"
4448

45-
& dotnet test -c Release
46-
if($LASTEXITCODE -ne 0) { exit 3 }
49+
& dotnet build -c Release
50+
if($LASTEXITCODE -ne 0) { exit 2 }
4751

4852
Pop-Location
4953
}

global.json

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

serilog-sinks-splunk.sln

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,27 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 14
4-
VisualStudioVersion = 14.0.25420.1
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26430.6
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{7A774CBB-A6E9-4854-B4DB-4CF860B0C1C5}"
77
EndProject
88
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "assets", "assets", "{B9B13339-749C-4098-8845-780ED4FA488A}"
99
ProjectSection(SolutionItems) = preProject
1010
Build.ps1 = Build.ps1
1111
CHANGES.md = CHANGES.md
12-
global.json = global.json
1312
README.md = README.md
1413
assets\Serilog.snk = assets\Serilog.snk
1514
EndProjectSection
1615
EndProject
1716
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{B16AD407-36C8-4286-A3E9-CACEBF359731}"
18-
ProjectSection(SolutionItems) = preProject
19-
.nuget\packages.config = .nuget\packages.config
20-
EndProjectSection
21-
EndProject
22-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Serilog.Sinks.Splunk", "src\Serilog.Sinks.Splunk\Serilog.Sinks.Splunk.xproj", "{32CF915C-3ECD-496C-8FDB-1214581274A6}"
2317
EndProject
2418
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "sample", "sample", "{1C75E4A9-4CB1-497C-AD17-B438882051A1}"
2519
EndProject
26-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Sample", "src\sample\Sample.xproj", "{17497155-5D94-45DF-81D9-BD960E8CF217}"
27-
EndProject
2820
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{B9451AD8-09B9-4C09-A152-FBAE24806614}"
2921
EndProject
30-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Serilog.Sinks.Splunk.Tests", "test\Serilog.Sinks.Splunk.Tests\Serilog.Sinks.Splunk.Tests.xproj", "{3C2D8E01-5580-426A-BDD9-EC59CD98E618}"
22+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serilog.Sinks.Splunk", "src\Serilog.Sinks.Splunk\Serilog.Sinks.Splunk.csproj", "{32CF915C-3ECD-496C-8FDB-1214581274A6}"
23+
EndProject
24+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serilog.Sinks.Splunk.Tests", "test\Serilog.Sinks.Splunk.Tests\Serilog.Sinks.Splunk.Tests.csproj", "{3C2D8E01-5580-426A-BDD9-EC59CD98E618}"
3125
EndProject
3226
Global
3327
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -39,10 +33,6 @@ Global
3933
{32CF915C-3ECD-496C-8FDB-1214581274A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
4034
{32CF915C-3ECD-496C-8FDB-1214581274A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
4135
{32CF915C-3ECD-496C-8FDB-1214581274A6}.Release|Any CPU.Build.0 = Release|Any CPU
42-
{17497155-5D94-45DF-81D9-BD960E8CF217}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
43-
{17497155-5D94-45DF-81D9-BD960E8CF217}.Debug|Any CPU.Build.0 = Debug|Any CPU
44-
{17497155-5D94-45DF-81D9-BD960E8CF217}.Release|Any CPU.ActiveCfg = Release|Any CPU
45-
{17497155-5D94-45DF-81D9-BD960E8CF217}.Release|Any CPU.Build.0 = Release|Any CPU
4636
{3C2D8E01-5580-426A-BDD9-EC59CD98E618}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
4737
{3C2D8E01-5580-426A-BDD9-EC59CD98E618}.Debug|Any CPU.Build.0 = Debug|Any CPU
4838
{3C2D8E01-5580-426A-BDD9-EC59CD98E618}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -53,7 +43,6 @@ Global
5343
EndGlobalSection
5444
GlobalSection(NestedProjects) = preSolution
5545
{32CF915C-3ECD-496C-8FDB-1214581274A6} = {7A774CBB-A6E9-4854-B4DB-4CF860B0C1C5}
56-
{17497155-5D94-45DF-81D9-BD960E8CF217} = {1C75E4A9-4CB1-497C-AD17-B438882051A1}
5746
{3C2D8E01-5580-426A-BDD9-EC59CD98E618} = {B9451AD8-09B9-4C09-A152-FBAE24806614}
5847
EndGlobalSection
5948
EndGlobal
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<Description>The Splunk Sink for Serilog</Description>
5+
<VersionPrefix>2.1.3</VersionPrefix>
6+
<Authors>Matthew Erbs, Serilog Contributors</Authors>
7+
<TargetFrameworks>net45;netstandard1.1</TargetFrameworks>
8+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
9+
<AssemblyName>Serilog.Sinks.Splunk</AssemblyName>
10+
<PackageId>Serilog.Sinks.Splunk</PackageId>
11+
<PackageTags>serilog;splunk;logging;event;collector</PackageTags>
12+
<PackageIconUrl>http://serilog.net/images/serilog-sink-nuget.png</PackageIconUrl>
13+
<PackageProjectUrl>https://github.com/serilog/serilog-sinks-splunk</PackageProjectUrl>
14+
<PackageLicenseUrl>http://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl>
15+
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
16+
</PropertyGroup>
17+
18+
<ItemGroup>
19+
<PackageReference Include="Serilog" Version="2.3.0" />
20+
</ItemGroup>
21+
22+
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
23+
<PackageReference Include="Splunk.Logging.Common" Version="1.6.0" />
24+
<Reference Include="System.Net.Http" />
25+
<Reference Include="System" />
26+
<Reference Include="Microsoft.CSharp" />
27+
</ItemGroup>
28+
29+
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' ">
30+
<DefineConstants>$(DefineConstants);TCP;UDP</DefineConstants>
31+
</PropertyGroup>
32+
33+
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.1' ">
34+
<PackageReference Include="System.Collections" Version="4.0.11" />
35+
<PackageReference Include="System.Collections.Concurrent" Version="4.0.12" />
36+
<PackageReference Include="System.Runtime" Version="4.1.0" />
37+
<PackageReference Include="System.Threading" Version="4.0.11" />
38+
<PackageReference Include="System.Net.Http" Version="4.1.1" />
39+
</ItemGroup>
40+
41+
</Project>

src/Serilog.Sinks.Splunk/Serilog.Sinks.Splunk.xproj

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

src/Serilog.Sinks.Splunk/project.json

Lines changed: 0 additions & 48 deletions
This file was deleted.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFrameworks>net452;netcoreapp1.0</TargetFrameworks>
5+
<AssemblyName>Serilog.Sinks.Splunk.Tests</AssemblyName>
6+
<PackageId>Serilog.Sinks.Splunk.Tests</PackageId>
7+
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
8+
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">$(PackageTargetFallback);dnxcore50;portable-net45+win8</PackageTargetFallback>
9+
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.0.4</RuntimeFrameworkVersion>
10+
</PropertyGroup>
11+
12+
<ItemGroup>
13+
<ProjectReference Include="..\..\src\Serilog.Sinks.Splunk\Serilog.Sinks.Splunk.csproj" />
14+
</ItemGroup>
15+
16+
<ItemGroup>
17+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20170106-08" />
18+
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta5-build1225" />
19+
<PackageReference Include="xunit" Version="2.2.0-beta5-build3474" />
20+
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
21+
</ItemGroup>
22+
23+
<ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
24+
<Reference Include="System" />
25+
<Reference Include="Microsoft.CSharp" />
26+
</ItemGroup>
27+
28+
</Project>

test/Serilog.Sinks.Splunk.Tests/Serilog.Sinks.Splunk.Tests.xproj

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

test/Serilog.Sinks.Splunk.Tests/project.json

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

0 commit comments

Comments
 (0)