Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET 8 RC2 #400

Merged
merged 2 commits into from
Nov 13, 2023
Merged

.NET 8 RC2 #400

merged 2 commits into from
Nov 13, 2023

Conversation

nblumhardt
Copy link
Member

Working my way through these in preparation for RTM in a couple of weeks.

I tried to keep this one as additive/nondestructive as possible, given all the quirks this project has to deal with across the supported TFMs :-)

@0xced
Copy link
Member

0xced commented Oct 25, 2023

In order to fix the tests that do not pass when running on .NET 8, <SelfContained>true</SelfContained> must be added to the TestApp.csproj file. This is because of a breaking change that was introduced in the .NET 8 SDK: Runtime-specific apps no longer self-contained. Especially this change:

If PublishSelfContained isn't explicitly set to false, the publish properties PublishSingleFile and PublishAot now imply SelfContained (if it's not specified) during dotnet publish only (that is, not for dotnet build or dotnet restore).

I had to read that sentence a few times to really grasp it!

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;net462</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net462;net8.0</TargetFrameworks>
Copy link
Member

@0xced 0xced Oct 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: net462;net6.0;net7.0;net8.0 would be easier to the eyes than net6.0;net7.0;net462;net8.0

@@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT'">net48</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworks);net7.0;net6.0</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworks);net7.0;net6.0;net8.0</TargetFrameworks>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: The order of the target frameworks is also a bit unsettling here.

@nblumhardt
Copy link
Member Author

Thanks for checking this one out @0xced, I'll take a look and fix it up 👍

@nblumhardt nblumhardt merged commit b174dd2 into serilog:dev Nov 13, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants