microsoft / TemplateStudio

Template Studio accelerates the creation of new WinUI 3, WPF, and UWP apps using a wizard-based experience.
Other
2.65k stars 459 forks source link

Visual Studio 2022 and Template Studio for WinUI (C#) hangs at creating project #4686

Closed riverar closed 1 year ago

riverar commented 1 year ago

Describe the bug

After using the Template Studio for WinUI (C#) wizard, Visual Studio 2022 hangs at the creating project dialog.

To Reproduce

  1. Install Template Studio 5.4
  2. Create a new project a. Project type: Navigation pane b. Design pattern: MVVM c. Pages: Add Settings d. Features: Add Self-Contained
  3. Observe Creating project... dialog never closes

Additional context

image

Applies to the following platforms:

About your setup

Windows 11 vNext (10.0.25375.1) Visual Studio 2022 Enterprise (17.5.1) Template Studio for WinUI 5.4

mrlacey commented 1 year ago

This looks like a duplicate of #4601

As a workaround, create in a directory further from the driver root, or don't check the "Place solution and Project in the same directory" option.

Some very old code in the wizard assumes that checkbox is not checked, and so it can query up the directory tree. If this fails (because it reaches a directory it doesn't have permission to access), it gets stuck like this. The fix is "complicated" :(

riverar commented 1 year ago

Thanks @mrlacey, that seems to workaround the issue indeed. Perhaps Template Studio should block this scenario until it's known working again?

mrlacey commented 1 year ago

Thanks @mrlacey, that seems to workaround the issue indeed. Perhaps Template Studio should block this scenario until it's known working again?

Again? It's never worked!

Could be a good look to test for this first 👍

riverar commented 1 year ago

Closing as duplicate of #4601