Skip to content

Commit

Permalink
Merge pull request #228 from nblumhardt/net-80-rc2
Browse files Browse the repository at this point in the history
Update to .NET 8 RC2
  • Loading branch information
nblumhardt committed Oct 23, 2023
2 parents 24d8583 + 80064f8 commit fe4afd2
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 22 deletions.
8 changes: 5 additions & 3 deletions Build.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
echo "build: Build started"

$env:Path = "$pwd/.dotnetcli;$env:Path"

Push-Location $PSScriptRoot

if(Test-Path .\artifacts) {
Expand All @@ -26,7 +28,7 @@ foreach ($src in ls src/*) {
& dotnet pack -c Release --include-source -o ..\..\artifacts
}

if($LASTEXITCODE -ne 0) { exit 1 }
if($LASTEXITCODE -ne 0) { throw "build failed" }

Pop-Location
}
Expand All @@ -37,7 +39,7 @@ foreach ($test in ls test/*.PerformanceTests) {
echo "build: Building performance test project in $test"

& dotnet build -c Release
if($LASTEXITCODE -ne 0) { exit 2 }
if($LASTEXITCODE -ne 0) { throw "test failed" }

Pop-Location
}
Expand All @@ -48,7 +50,7 @@ foreach ($test in ls test/*.Tests) {
echo "build: Testing project in $test"

& dotnet test -c Release
if($LASTEXITCODE -ne 0) { exit 3 }
if($LASTEXITCODE -ne 0) { throw "test failed" }

Pop-Location
}
Expand Down
9 changes: 9 additions & 0 deletions Setup.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
$ErrorActionPreference = "Stop"

$RequiredDotnetVersion = $(cat ./global.json | convertfrom-json).sdk.version

New-Item -ItemType Directory -Force "./build/" | Out-Null

Invoke-WebRequest "https://dot.net/v1/dotnet-install.ps1" -OutFile "./build/installcli.ps1"
& ./build/installcli.ps1 -InstallDir "$pwd/.dotnetcli" -NoPath -Version $RequiredDotnetVersion
if ($LASTEXITCODE) { throw ".NET install failed" }
5 changes: 3 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ version: '{build}'
skip_tags: true
image: Visual Studio 2022
install:
- ps: mkdir -Force ".\build\" | Out-Null
- pwsh: ./Setup.ps1
- pwsh: mkdir -Force ".\build\" | Out-Null
build_script:
- ps: ./Build.ps1
- pwsh: ./Build.ps1
test: off
artifacts:
- path: artifacts/Serilog.*.nupkg
Expand Down
5 changes: 5 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"sdk": {
"version": "8.0.100-rc.2.23502.2"
}
}
6 changes: 3 additions & 3 deletions samples/Sample/Sample.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>Sample</AssemblyName>
<OutputType>Exe</OutputType>
<ImplicitUsings>enable</ImplicitUsings>
Expand All @@ -12,8 +12,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0-*" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0-*" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
</ItemGroup>

Expand Down
3 changes: 3 additions & 0 deletions serilog-extensions-logging.sln
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "assets", "assets", "{9C21B9
Directory.Build.targets = Directory.Build.targets
README.md = README.md
assets\Serilog.snk = assets\Serilog.snk
build.sh = build.sh
Setup.ps1 = Setup.ps1
global.json = global.json
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serilog.Extensions.Logging.Benchmarks", "test\Serilog.Extensions.Logging.Benchmarks\Serilog.Extensions.Logging.Benchmarks.csproj", "{6D5986FF-EECD-4E75-8BC6-A5F78AB549B2}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<PropertyGroup>
<Description>Low-level Serilog provider for Microsoft.Extensions.Logging</Description>
<!-- This must match the major and minor components of the referenced Microsoft.Extensions.Logging package. -->
<VersionPrefix>7.0.1</VersionPrefix>
<VersionPrefix>8.0.0</VersionPrefix>
<Authors>Microsoft;Serilog Contributors</Authors>
<!-- These must match the Dependencies tab in https://www.nuget.org/packages/microsoft.extensions.logging at
the target version. -->
<TargetFrameworks>net462;netstandard2.0;netstandard2.1;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0;netstandard2.1;net6.0;net7.0;net8.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageTags>serilog;Microsoft.Extensions.Logging</PackageTags>
<PackageIcon>serilog-extension-nuget.png</PackageIcon>
Expand All @@ -31,7 +31,7 @@
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Serilog" Version="3.1.0-*" />
<!-- The version of this reference must match the major and minor components of the package version prefix. -->
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0-*" />
<PackageReference Include="Nullable" Version="1.3.1" PrivateAssets="All" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

Expand All @@ -10,10 +10,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" PrivateAssets="All" />
<PackageReference Include="xunit" Version="2.5.1" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.5" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" PrivateAssets="All" />
<PackageReference Include="xunit" Version="2.5.2" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.9" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0;net472</TargetFrameworks>
<TargetFrameworks>net8.0;net48</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net472' ">

<PropertyGroup Condition=" '$(TargetFramework)' == 'net48' ">
<DefineConstants>$(DefineConstants);FORCE_W3C_ACTIVITY_ID</DefineConstants>
</PropertyGroup>

Expand All @@ -14,9 +14,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" PrivateAssets="all" />
<PackageReference Include="xunit" Version="2.5.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" PrivateAssets="all" />
<PackageReference Include="xunit" Version="2.5.2" />
<PackageReference Include="Shouldly" Version="4.1.0" />
<PackageReference Include="PublicApiGenerator" Version="11.0.0" />
</ItemGroup>
Expand Down

0 comments on commit fe4afd2

Please sign in to comment.