appveyor/ci

.NET 8.0 support

Giorgi opened this issue ยท 16 comments

Giorgi commented

Do you have plans to add support for .NET 8?

Yes!

Giorgi commented

Any timeframe?

The workaround from #3745 could still work, but haven't tried (yet)

Giorgi commented

Huh, didn't remember that it was me asking for .NET 6 support :)

Unfortunately, that workaround has important limitations:

  • Even though the docs suggest that the two-digit form 8.0 would be sufficient, you actually have to pass in 8.0.100
  • More problematic for me was that I am compiling a solution with multiple targets and I am getting NETSDK1127 for the .NET 6 targets, no idea how to fix these (the current Visual Studio 2022 image should support .NET 6, is it?)

My workaround is this:

before_build:
- choco install dotnet-sdk --version 8.0.100

https://github.com/tompazourek/Rationals/blob/eb30e870c6cd41845bd2b9cf9afc6d75854e640b/.appveyor.yml#L14

Ideally pair it with global.json like:

{
  "sdk": {
    "version": "8.0.100",
    "rollForward": "latestFeature"
  }
}

But I'm also looking forward to the built-in support and waiting for it on some projects.

New Visual Studio 2019 images with .NET 8 are live.
Visual Studio 2022 images and updated documentation forthcoming.

I'm not convinced that Visual Studio 2019 images with .NET 8 are live:

dotnet clean src -c Release --nologo -v minimal
C:\Program Files\dotnet\sdk\5.0.416\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(141,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 8.0. Either target .NET 5.0 or lower, or use a version of the .NET SDK that supports .NET 8.0.

In general, are .NET SDK updates entirely manual? If an 8.0.* security fix release comes out tomorrow, is the time before getting it in the images measured in hours, or months? Is a human being involved?

I'm not convinced that Visual Studio 2019 images with .NET 8 are live:

dotnet clean src -c Release --nologo -v minimal
C:\Program Files\dotnet\sdk\5.0.416\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(141,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 8.0. Either target .NET 5.0 or lower, or use a version of the .NET SDK that supports .NET 8.0.

In general, are .NET SDK updates entirely manual? If an 8.0.* security fix release comes out tomorrow, is the time before getting it in the images measured in hours, or months? Is a human being involved?

Sorry, that's correct. I had to patch the image after deploying it but the patch failed to include the new SDK. I'm in the very human process of re-deploying it now.
You can see the history of platform updates here.

New images have been deployed with .NET 8 sdk.

Works for me. Thanks!

For future reference, running the following (Powershell Core) ahead of my main build script works well both before the new deploy and after the new deploy. In the former case, the log would show it installing. In the latter case, it automatically detects that it's already installed, so there's no harm in folks including this "defensively" for the future:

Invoke-WebRequest 'https://dot.net/v1/dotnet-install.ps1' -OutFile "dotnet-install.ps1"

./dotnet-install.ps1 -InstallDir "$env:ProgramFiles\dotnet" -Channel 8.0 -Quality GA

dotnet --version

Hi @OwenMcDonnell ,

Visual Studio 2022 images with .NET 8 are live?

Hi @OwenMcDonnell ,

Visual Studio 2022 images with .NET 8 are live?

Just tried it, not yet unfortunately ๐Ÿ˜ž

Sorry there was some shuffling going on to fix an issue that cropped up with nunit on both images. Both Visual Studio 2022 and Visual Studio 2019 images with .NET 8 have been deployed.

Confirming, it works now.

@OwenMcDonnell Thank you very much for these updates.

waiting for the ubuntu images to be updated as well? thanks for the efforts, btw!