11

Before updating VS2019 to version 18.2, I was creating WPF Core projects by selecting built-in template WPF (.NET Core). But now this template is missing. What I see are something like the ones shown below. I have not made any changes to the VS2019 except automated updates (like 18.2 this week). My Visual Studio installer (shown below) shows the workloads I have installed. Question: Why the WPF .NET Core template is missing? in the project creation start page, and can it be brought back?

Remark: I see similar issue posted here with no resolution.

enter image description here

or

enter image description here

My Visual Studio Installer Workloads:

enter image description here

nam
  • 21,967
  • 37
  • 158
  • 332

2 Answers2

20

Because ".NET" (5) is the main implementation going forward. It is the successor of .NET Core 3.1 and apparently "Core" has been removed from the name of the templates. Now it's just .NET or (the legacy) .NET Framework.

You can set the <TargetFramework> property in the .csproj file to either net5.0-windows or netcoreapp3.1 depending on whether you want to target .NET 5 or .NET Core 3.1.

.NET Core 3.1 is a Long Term Support (LTS) release and .NET 5 is a Current release: https://dotnet.microsoft.com/platform/support/policy/dotnet-core

mm8
  • 163,881
  • 10
  • 57
  • 88
  • 1
    Thanks. `VS2019` team should display a brief note about this change on the `Start Window` to avoid confusion when creating a project. I wasted my time by first searching hard to find the `.WPF (.NET Core)` project template, then investigating my `VS installer workloads`, then searching for a resolution online, then reading the same issue posted on the link in my Remark section to see if there is a resolution, then looking at some other project templates that still have `(.NET Core)` in front of their names (e.g. `Console App (.NET Core`), then finally posting the issue here on `StackOverflow`. – nam Dec 02 '20 at 16:48
0

If someone wants to create WPF project that uses .NET (core) 6.0 since 2023 then you need to install .NET Framework 3.5 in Visual Studio Installer enter image description here Example of usage:

  • to generate .appinstaller that is broken in MAUI project.
Marek Pio
  • 49
  • 8