Skip to content

Error list contains an error warnings "The current Visual Studio version does not support targeting .NET 10.0. Either target .NET 99.9 or lower..." after opening the dogfooding solution #63984

@jinzhao1127

Description

@jinzhao1127

Platform

  • Windows
  • macOS
  • Linux

Repro Steps

  1. Open Command Prompt as administrator on a clean virtual machine, create a new Repos folder under %userprofile% and navigate to it
    cd %userprofile%
    mkdir Repos
    cd Repos
    git clone --recursive https://github.com/dotnet/aspnetcore
    
  2. Open Windows PowerShell, navigate to AspNetCore: cd Repros/AspNetCore
  3. On Windows PowerShell, Run: Set-ExecutionPolicy RemoteSigned -Scope CurrentUser , Type Y
  4. Continue to run: eng/scripts/InstallVisualStudio.ps1 -Version 2022 -Edition Enterprise -Channel Preview , this will open the Visual Studio Installer > Click "Install" on Visual Studio Installer
  5. After VS is installed completely, open it > Tools > Options> Environment > Preview Features, check "Use previews of the .NET Core SDK" > OK and then restart VS.
  6. On Windows PowerShell, Run: .\restore.cmd .
  7. Change into the src/Mvc directory and run ./build.cmd
  8. On Windows PowerShell, Run . .\..\..\activate.ps1 in the repository root
  9. Open Mvc.slnf in Visual Studio by running .\startvs.cmd src/Mvc/Mvc.slnf in Windows PowerShell

Actual Result
There is an error after opening the solution:

Image

Error Log

Severity Code Description Project File Line Suppression State
Error (active) NETSDK1209 The current Visual Studio version does not support targeting .NET 10.0.  Either target .NET 99.9 or lower, or use Visual Studio version 17.16 or higher ControllersFromServicesWebSite, ErrorPageMiddlewareWebSite, GenericHostWebSite, HtmlGenerationWebSite, Microsoft.AspNetCore.Authentication.Abstractions, Microsoft.AspNetCore.Components.Authorization, Microsoft.AspNetCore.Components.Endpoints, Microsoft.AspNetCore.Components.Web, Microsoft.AspNetCore.DataProtection.Extensions (net10.0), Microsoft.AspNetCore.Hosting, Microsoft.AspNetCore.Hosting.Server.Abstractions, Microsoft.AspNetCore.Http.Features, Microsoft.AspNetCore.Http.Results, Microsoft.AspNetCore.Localization.Routing, Microsoft.AspNetCore.Metadata (net10.0), Microsoft.AspNetCore.Mvc, Microsoft.AspNetCore.Mvc.Abstractions, Microsoft.AspNetCore.Mvc.Abstractions.Test, Microsoft.AspNetCore.Mvc.ApiExplorer, Microsoft.AspNetCore.Mvc.Cors, Microsoft.AspNetCore.Mvc.DataAnnotations.Test, Microsoft.AspNetCore.Mvc.Localization, Microsoft.AspNetCore.Mvc.Localization.Test, Microsoft.AspNetCore.Mvc.Testing, Microsoft.AspNetCore.SignalR.Protocols.Json (net10.0), Microsoft.Extensions.Localization.Abstractions (net10.0), Microsoft.Extensions.ObjectPool (net10.0), MvcFormSample, RazorBuildWebSite.Views, RazorWebSite, SimpleWebSiteWithWebApplicationBuilderException C:\Program Files\dotnet\sdk\9.0.305\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets 171  

Expected Result
There is no any error or warnings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templates

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions