Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

442
Vistas
Cannot find .NET 5.0 Console App project template in Visual Studio 2019

I'm currently trying to create a C# .NET 5.0 Console Application in Visual Studio 2019, and the option does not appear under project templates as I expect it to.

I downloaded Visual Studio Professional 2019 Version 16.9.4 (from https://visualstudio.microsoft.com/downloads/) and selected all workloads to be installed, then I installed SDK 5.0.202, ASP.NET Core Runtime 5.0.5, .NET Desktop Runtime 5.0.5, and .NET Runtime 5.0.5 (from https://dotnet.microsoft.com/download/dotnet/5.0).

When I go to File -> New -> Project and search for "Console Application", there is no default "Console Application" project template for C#. The closest I can find is "Console Application (.NET Framework)" for C#, VB, and F# and "Console Application" for C++. If I select "Console Application (.NET Framework)" for C#, the latest Framework that I can choose is ".NET Framework 4.8".

Actual Outcome: Project Templates

Actual Outcome: Project Templates

Actual Outcome: Frameworks Actual Outcome: Frameworks

I compared notes with a developer who did not run into this problem, and they see the same framework restriction when they select "Console Application (.NET Framework)" for C#, but is also able to see the project template "Console Application" for C# (without ".NET Framework") and select ".NET 5.0 (Current)" as the target framework as expected. Nothing about what they installed and updated appeared to be noticeably different, our results for the command prompt command "dotnet --info" matched, and they did not have any "Installed products" listed under "About" or "Individual Components" listed under the installer that I was missing.

Expected Outcome: Project Templates

Expected Outcome: Project Templates

Expected Outcome: Frameworks

Expected Outcome: Frameworks

I have tried uninstalling and reinstalling everything, exhaustively installing every workload as well as additional individual components that looked potentially relevant, and making sure that the "Tools -> Options -> Environment -> Preview Features -> Show All .NET Core templates in the New project dialog (requires restart)" checkbox is checked.

Does anyone know what step I'm missing that is preventing me from creating a Console Application project template in C# using .NET 5.0?

over 4 years ago · Santiago Trujillo
5 Respuestas
Responde la pregunta

0

While it can be hard to tell what's exactly the issue with VS or local environment you have, it should be possible to temporary create projects with dotnet cli:

dotnet new console --output <project-dir>

If you would want to add it to an existing solution run

dotnet sln <solution-name>.sln add <project-dir>

The console app project file is very simple, so you can even create it manually, or create a project from any existing template and replace the contents with following asa workaround:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net5.0</TargetFramework>
  </PropertyGroup>

</Project>

And maybe one more thing you could try is to run the VS installer as admin or ensure that it can install and access all the required components.

over 4 years ago · Santiago Trujillo Denunciar

0

I have VS 2019 version 16.9.5 when I seen your post. I am using console app for my sample projects. I have tried it and able to achieve what you are looking for. I would recommend to update your VS to 16.9.5 and give it a try.


My VS 2019 version:

enter image description here


Creating Console app in VS 2019 16.9.5:

enter image description here


Finally it has created a console app project with target framework as .net 5.0

enter image description here

over 4 years ago · Santiago Trujillo Denunciar

0

Eventually clear the MEF component cache, manually or with this extension.

But most likely something is wrong in the user cache at C:\Users\USERNAME\AppData\Local\Microsoft\VisualStudio\16.0_93de0ddd, which includes in particular InstalledTemplates.json and privateregistry.bin.

Try and rename (or delete) the folder, (or one the the two mentionned files to narrow the problem down), while VS is off, and restart VS. Only make sure that you have the proper workloads installed and the .net 5 from VS.

over 4 years ago · Santiago Trujillo Denunciar

0

I checked and I am able to create dotnet5.0 console application with visual studio version 16.9.2 and SDK version 5.0.201. I think there is some installation conflict on your end. You can try uninstalling the SDK and reinstalling visual studio or updating it to latest version and downloading latest SDK. Also check if SDK is getting installed on your system under

C:\Program Files\dotnet\sdk[your SDK version]\

over 4 years ago · Santiago Trujillo Denunciar

0

I ran into this problem on VS2022 Preview 7.0.

Upon doing dotnet --version I got back 5.0.100-preview.6.20318.15, I must have installed it some time ago and it was still on the system path. So I downloaded and installed dotnet 6.0.100-rc.2.21505.57

After that VS started working as it should.


EDIT: I just got lucky. I'm now on VS2022 17.1.0 Preview 1.1 and am running the production versions of .Net 5.0.403 & .Net 6.0.100.
The problem mysteriously came back. I did not knowingly change anything. My best guess is it broke weeks ago when I upgraded VS2022 and I just haven't realized till now.

I've completely and painstakingly uninstalled EVERYTHING. VisualStudio 2019 & 2022 as well as all of dotnet core and 5.0 & 6.0. I even got all the remnants I didn't know stuck around from years ago. I then reinstalled everything and still, no Net5.0 or Net6.0 templates.

I noticed that the uninstall strings for the .NET Template packages have an /I for install prefix instead of /X for uninstall. I figured maybe this could mean the packages aren't actually installed, so I've tried to run them manually but that fails. I'm out of ideas.

enter image description here

So far the only successful way I've had to create a net5.0 or net6.0 project in visual studio is by downloading Classic Console Template, which provides enough bootstrapping to actually create a new project.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda