.netvisual-studiosdk

NETSDK1045: The current .NET SDK does not support targeting .NET 8.0.1


dotnet --list-sdks 

indicates that I have .net8.0.1 installed.

versions

My c# Solution has .Net7 and .Net8 projects and builds OK.

If I change the main project to have

<Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
        <OutputType>WinExe</OutputType>
        <TargetFramework>net8.0.101-windows</TargetFramework>
  

When I build I get

NETSDK1045: The current .NET SDK does not support targeting .NET 8.0.1. Either target .NET 8.0 or lower, or use a version of the .NET SDK that supports .NET 8.0.1. Download the .NET SDK from https://aka.ms/dotnet/download

[Update] This is what I see in my bin\debug folder enter image description here

I deleted the obj and build folders. Now when I attempt to build I get NetSDK1004

I am using VS17.8.5


Solution

  • I reinstalled the latest sdk which was v8.0.101 cleaned rebuilt Now I only have the bin\debug\net8.0-windows folder as desired.