Migrating to .Net8

Nov 25, 2023
by:   Tim Stanley

On November 14, 2023, Microsoft released .Net 8. After getting Visual Studio Professional 17.8 installed, updating to .Net 8 was easy.

Changing the obligatory TargetFramework entry in all the projects:

<TargetFramework>net8.0</TargetFramework>

Updating the package references from 7.0.0 to 8.0.0:

<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />

Updating the github action yml file to use the new dotnet version:

      - name: Set up .NET Core
        uses: actions/setup-dotnet@v3
        with:
          dotnet-version: '8.x'

Azure even had all the website hosting ready so I didn't have to wait for anyone to deploy .Net 8.

I did need to update the App service configuration to switch from .Net 7 to .Net 8 LTS. It was a little confusing because only the .NET 8 LTS (Early Access) option was listed for .Net 8.

App Service Configuration

References

Related Items