Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't Create New WinUI Project #6767

Closed
2 tasks
Kurt-von-Laven opened this issue Feb 25, 2022 · 13 comments
Closed
2 tasks

Can't Create New WinUI Project #6767

Kurt-von-Laven opened this issue Feb 25, 2022 · 13 comments
Labels

Comments

@Kurt-von-Laven
Copy link

Describe the bug

In Visual Studio 17.1.0, WinUI does not appear in the drop down menu of new project templates. I suspect this is because some tool, workload, component, or feature needs to be installed that is not documented here.

Steps to reproduce the bug

  1. Completely uninstall all versions of Visual Studio and associated tools, components, etc.
  2. Install Visual Studio 17.1.0.
  3. Install all of the workloads documented here:
  • On the Workloads tab of the installation dialog, select:

    • Universal Windows Platform development
      • Then in the Installation details pane of the installation dialog for that workload, make sure C++ (v143) Universal Windows Platform tools is selected.
    • .NET Desktop Development for C# app development
      • Then in the Installation details pane of the installation dialog, select Windows App SDK C# Templates (at the bottom of the list).
    • Desktop development with C++ for C++ app development
      • Then in the Installation details pane of the installation dialog, select Windows App SDK C++ Templates (at the bottom of the list).
  • On the Individual components tab of the installation dialog, in the SDKs, libraries, and frameworks section, make sure Windows 10 SDK (10.0.19041.0) is selected.

  1. Follow the steps documented here:
  1. In Visual Studio, select File > New > Project.

  2. In the New Project dialog's drop-down filters, select C#/C++, Windows, and WinUI, respectively.

Expected behavior

I expected WinUI to appear in the drop down menu of project types and Blank App, Packaged (WinUI 3 in Desktop) to appear in the list of project templates, but both are absent.

Screenshots

No response

NuGet package version

No response

Windows app type

  • UWP
  • Win32

Device form factor

No response

Windows version

No response

Additional context

I installed Microsoft Visual C++ Redistributable packages for Visual Studio 2015, 2017, 2019, and 2022 for x64 from here as suggested by Microsoft customer support and rebooted. There was no change in symptoms.

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Feb 25, 2022
@castorix
Copy link

Did you install the VSIX ?
Current releases

@Kurt-von-Laven
Copy link
Author

They are neither required nor able to be installed on Visual Studio 17.1.0, but I did attempt to install the Windows App SDK (1.0 Stable) C# Visual Studio 2022 extension to no avail. The error message given stated it was already installed.

@castorix
Copy link

When I do a trace, the WinUI templates that I installed are read from my VS 2020 installation directory + \COMMON7\IDE\EXTENSIONS...\ProjectTemplates\VC\1033
=>

WinUI.Desktop.CppWinRT.PackagedApp
WinUI.Desktop.CppWinRT.SingleProjectPackagedApp
WinUI.Neutral.CppWinRT.RuntimeComponent

WinUI.Desktop.Cs.ClassLibrary
WinUI.Desktop.Cs.PackagedApp
WinUI.Desktop.Cs.SingleProjectPackagedApp

@Kurt-von-Laven
Copy link
Author

Are you also on Visual Studio 17.1.0? The documentation explicitly states that the extension only needs to be installed on earlier versions, which leads me to suspect that this issue is related to the release of 17.1.0.

If you followed the instructions in Required workloads and components above, then the templates are already installed.

I also wonder whether you had already installed the extension prior to upgrading and, if so, at which version of Visual Studio, and what version of the extension?

@castorix
Copy link

castorix commented Feb 25, 2022

I also wonder whether you had already installed the extension prior to upgrading and, if so, at which version of Visual Studio, and what version of the extension?

Yes, you're right. I have 17.1.0, but I had installed the 2 VSIX before upgrading (they have been updated with 17.1.0, which I can see in "Manage Extensions", 1.0.0.59203563 for C++, 1.0.0.59203525 for C#)
and in "Create a new project" =>
WinUI_Templates

@Kurt-von-Laven
Copy link
Author

Kurt-von-Laven commented Feb 25, 2022

When I open the C# VS 2022 VSIX Installer with Microsoft Visual Studio Version Selector, I see the following error message:

This extension is already installed to all applicable products.

I also see the same versions listed in "Manage Extensions" for both of those extensions, and WinUI appears in the new project templates now, but none of these were listed previously even though I had already tried installing WindowsAppSDK.Cs.Extension.Dev17.Standalone.vsix and performed all of the steps described above followed by a reboot. The only thing I did was install the MSIX packages, but when that didn't work I uninstalled them, and it still didn't work. Then I rebooted, and the extensions and WinUI project templates were finally displayed. Maybe installing and uninstalling the MSIX packages triggered something? I'm certain there is a bug here, but I don't know how to help uncover it at this point. I'm guessing we should close this issue, and someone can open a new one linking to it if they encounter the same problem?

@huoyaoyuan
Copy link

For VS 17.1, you can install the template via VS installer. You can try to install or uninstall and see if there's still problem.

@Kurt-von-Laven
Copy link
Author

This issue is about that process not working as intended.

@StephenLPeters StephenLPeters added area-Tooling product-winui3 WinUI 3 issues team-Markup Issue for the Markup team labels Mar 5, 2022
@StephenLPeters
Copy link
Contributor

@evelynwu-msft FYI

@GideonUng
Copy link

Same issue. clean windows 11 & vs 17.1 install

@jonaskohl
Copy link

Same issue with Windows 11 & VS 17.2.1. Installing the VSIX manually fails stating a newer version of the product is already installed.

@ljredux
Copy link

ljredux commented Jul 15, 2022

Same issue. Windows 11 & VS 17.2.6.

@bpulliam bpulliam removed the needs-triage Issue needs to be triaged by the area owners label Dec 6, 2022
@github-actions
Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants