Cant add Window (WPF) in Microsoft Visual Studio Community 2019 Version 16.7.2 for C#

Sigma 1 Reputation point
2020-09-04T14:31:45.277+00:00

Im using Microsoft Visual Studio Community 2019 Version 16.7.2.
I've installed Universal Windows Platform development from Visual Studio Installer.
When I create a new project I get a Window, but I want to add another. My problem is that Window is not part of the add list.

22689-w.png

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,979 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Tianyu Sun-MSFT 30,071 Reputation points Microsoft Vendor
    2020-09-07T07:01:19.66+00:00

    Hi Sigma,

    I agree with Viorel, please install “.NET desktop development” workload from VS Installer (Visual Studio Installer > find VS 2019 > More > Modify > select the workload > Modify).

    Besides, I noticed that you just installed Universal Windows Platform development in VS, so did you create a UWP (Universal Windows Platform) project, and right-clicked the project to try to add a Window (WPF)? If yes, I’m afraid, you can’t add a Window(WPF) in a UWP project, please create a new WPF project after installing the “.NET desktop development” workload, and try to add a Window (WPF) in WPF project.

    Best Regards,
    Tianyu

    3 people found this answer helpful.
    0 comments No comments

  2. Viorel 115.9K Reputation points
    2020-09-04T19:00:36.703+00:00

    For WPF, I think that you should select “.NET desktop development” in Installer.

    Also make sure that you select the project node (not solution or other items) before displaying the Add New Item dialog.

    2 people found this answer helpful.
    0 comments No comments

  3. Andrew Eckrich 16 Reputation points
    2020-09-17T01:37:15.74+00:00

    For .NET and Visual studio/etc,,try the Microsoft/MSDN site/answers.

    https://social.msdn.microsoft.com/Forums/en-US/home

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.