Skip to content

Commit b12e44d

Browse files
authored
Merge pull request #94 from TroySchmidt/dev
Compatibility for .Net Core 2.0 and .Net 4.5
2 parents 0bcfb43 + 7fd6cee commit b12e44d

14 files changed

+116
-1860
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,3 +181,4 @@ UpgradeLog*.htm
181181

182182
# Microsoft Fakes
183183
FakesAssemblies/
184+
/.vs/serilog-sinks-mssqlserver/v15/sqlite3

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
A Serilog sink that writes events to Microsoft SQL Server. While a NoSql store allows for more flexibility to store the different kinds of properties, it sometimes is easier to use an already existing MS SQL server. This sink will write the logevent data to a table and can optionally also store the properties inside an Xml column so they can be queried.
66

77
**Package** - [Serilog.Sinks.MSSqlServer](http://nuget.org/packages/serilog.sinks.mssqlserver)
8-
| **Platforms** - .NET 4.5
8+
| **Platforms** - .NET 4.5 and .NET Standard 2.0
99

1010
## Configuration
1111

appveyor.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
version: '{build}'
22
skip_tags: true
3-
image: Visual Studio 2015
3+
image: Visual Studio 2017
44
configuration: Release
55
install:
66
- ps: mkdir -Force ".\build\" | Out-Null
7-
- ps: Invoke-WebRequest "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0-preview2/scripts/obtain/dotnet-install.ps1" -OutFile ".\build\installcli.ps1"
8-
- ps: $env:DOTNET_INSTALL_DIR = "$pwd\.dotnetcli"
9-
- ps: '& .\build\installcli.ps1 -InstallDir "$env:DOTNET_INSTALL_DIR" -NoPath -Version 1.0.0-preview2-003121'
10-
- ps: $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path"
117
build_script:
128
- ps: ./Build.ps1
139
test: off

global.json

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

serilog-sinks-mssqlserver.sln

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
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.26730.16
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{04226074-C72F-42BC-AB02-4D70A7BAE7E1}"
77
EndProject
8-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Serilog.Sinks.MSSqlServer", "src\Serilog.Sinks.MSSqlServer\Serilog.Sinks.MSSqlServer.xproj", "{803CD13A-D54B-4CEC-A55F-E22AE3D93B3C}"
9-
EndProject
108
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{F02D6513-6F45-452E-85A0-41A872A2C1F8}"
119
EndProject
12-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Serilog.Sinks.MSSqlServer.Tests", "test\Serilog.Sinks.MSSqlServer.Tests\Serilog.Sinks.MSSqlServer.Tests.xproj", "{3C2D8E01-5580-426A-BDD9-EC59CD98E618}"
13-
EndProject
1410
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{70667ADA-A2FD-4821-A6A1-8D18D0D71507}"
1511
ProjectSection(SolutionItems) = preProject
1612
appveyor.yml = appveyor.yml
1713
Build.ps1 = Build.ps1
1814
CHANGES.md = CHANGES.md
19-
global.json = global.json
2015
README.md = README.md
2116
EndProjectSection
2217
EndProject
18+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serilog.Sinks.MSSqlServer", "src\Serilog.Sinks.MSSqlServer\Serilog.Sinks.MSSqlServer.csproj", "{803CD13A-D54B-4CEC-A55F-E22AE3D93B3C}"
19+
EndProject
20+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serilog.Sinks.MSSqlServer.Tests", "test\Serilog.Sinks.MSSqlServer.Tests\Serilog.Sinks.MSSqlServer.Tests.csproj", "{3C2D8E01-5580-426A-BDD9-EC59CD98E618}"
21+
EndProject
2322
Global
2423
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2524
Debug|Any CPU = Debug|Any CPU
@@ -42,4 +41,7 @@ Global
4241
{803CD13A-D54B-4CEC-A55F-E22AE3D93B3C} = {04226074-C72F-42BC-AB02-4D70A7BAE7E1}
4342
{3C2D8E01-5580-426A-BDD9-EC59CD98E618} = {F02D6513-6F45-452E-85A0-41A872A2C1F8}
4443
EndGlobalSection
44+
GlobalSection(ExtensibilityGlobals) = postSolution
45+
SolutionGuid = {AAA6BF8D-7B53-4A5F-A79A-D1B306383B45}
46+
EndGlobalSection
4547
EndGlobal
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<Description>A Serilog sink that writes events to Microsoft SQL Server</Description>
5+
<VersionPrefix>5.1.0</VersionPrefix>
6+
<Authors>Michiel van Oudheusden;Serilog Contributors</Authors>
7+
<TargetFrameworks>netstandard2.0;net45;net452</TargetFrameworks>
8+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
9+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
10+
<AssemblyName>Serilog.Sinks.MSSqlServer</AssemblyName>
11+
<AssemblyOriginatorKeyFile>../../assets/Serilog.snk</AssemblyOriginatorKeyFile>
12+
<SignAssembly>true</SignAssembly>
13+
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
14+
<PackageId>Serilog.Sinks.MSSqlServer</PackageId>
15+
<PackageTags>serilog;sinks;mssqlserver</PackageTags>
16+
<PackageIconUrl>http://serilog.net/images/serilog-sink-nuget.png</PackageIconUrl>
17+
<PackageProjectUrl>https://github.com/serilog/serilog-sinks-mssqlserver</PackageProjectUrl>
18+
<PackageLicenseUrl>http://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl>
19+
<RuntimeIdentifiers>win</RuntimeIdentifiers>
20+
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
21+
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
22+
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
23+
</PropertyGroup>
24+
25+
<ItemGroup>
26+
<PackageReference Include="Serilog" Version="2.5.0" />
27+
<PackageReference Include="Serilog.Sinks.PeriodicBatching" Version="2.1.1" />
28+
</ItemGroup>
29+
30+
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0'">
31+
<DefineConstants>NETCORE;NETSTANDARD;NETSTANDARD2_0</DefineConstants>
32+
</PropertyGroup>
33+
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0'">
34+
<PackageReference Include="System.Data.SqlClient" Version="4.4.0" />
35+
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.4.0" />
36+
</ItemGroup>
37+
38+
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
39+
<Reference Include="System.Data" />
40+
<Reference Include="System.Xml" />
41+
<Reference Include="System.Xml.Linq" />
42+
<Reference Include="System.Configuration" />
43+
<Reference Include="System" />
44+
<Reference Include="Microsoft.CSharp" />
45+
</ItemGroup>
46+
47+
<ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
48+
<Reference Include="System.Data" />
49+
<Reference Include="System.Xml" />
50+
<Reference Include="System.Xml.Linq" />
51+
<Reference Include="System.Configuration" />
52+
<Reference Include="System" />
53+
<Reference Include="Microsoft.CSharp" />
54+
</ItemGroup>
55+
56+
</Project>

src/Serilog.Sinks.MSSqlServer/Serilog.Sinks.MSSqlServer.xproj

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

src/Serilog.Sinks.MSSqlServer/project.json

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

src/Serilog.Sinks.MSSqlServer/project.lock.json

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

test/Serilog.Sinks.MSSqlServer.Tests/DatabaseFixture.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ WITH ROLLBACK IMMEDIATE
2727
DROP DATABASE [{Database}]
2828
";
2929

30-
public static string MasterConnectionString => @"Data Source=(LocalDb)\v11.0;Initial Catalog=Master;Integrated Security=True";
31-
public static string LogEventsConnectionString => $@"Data Source=(LocalDb)\v11.0;Initial Catalog={Database};Integrated Security=True";
30+
public static string MasterConnectionString => @"Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=Master;Integrated Security=True";
31+
public static string LogEventsConnectionString => $@"Data Source=(localdb)\MSSQLLocalDB;Initial Catalog={Database};Integrated Security=True";
3232

3333
public class FileName
3434
{

0 commit comments

Comments
 (0)