-
Notifications
You must be signed in to change notification settings - Fork 667
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
WinUI 3 C# Window Templates are missing in Visual Studio 2022 17.2.2 in Add new item dialogue. #7148
Comments
Visual Studio 2022 16.2.2 doesn't exist. If you are using VS 2019 then they are installed via an extension: |
Sorry that was my version writing issue.
In VS 17.2.2 that is.
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows
From: Kevin ***@***.***>
Sent: Thursday, May 26, 2022 3:38 PM
To: ***@***.***>
Cc: ***@***.***>; ***@***.***>
Subject: Re: [microsoft/microsoft-ui-xaml] WinUI 3 C# Window Templates are missing in Visual Studio 2022 16.2.2 in Add new item dialogue. (Issue #7148)
are missing in Visual Studio 2022 16.2.2
Visual Studio 2022 16.2.2 doesn't exist.
If you are using VS 2019 then they are installed via an extension:
https://docs.microsoft.com/en-us/windows/apps/windows-app-sdk/set-up-your-development-environment?tabs=vs-other%2Cvs-2019#visual-studio-project-and-item-templates
—
Reply to this email directly, view it on GitHub<#7148 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ATZA77L6RYIU4RYIR7VMDFTVL5IDRANCNFSM5XAJFELQ>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Try reinstalling the templates (or check that they are selected in the below bundle):
|
I have did it before. Even reinstalled windows 11 and reinstalled VS 2022.
Problem still exist.
If I use default Windows App SDK 1.0 installed by VS then templates are displayed.
If I use Windows App SDK 1.1.0 Preview 3 then templates are missing from C# based Win32 WinUI Project. (I need to use this version because I need to use MICA in WinUI 3)…
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows
From: Kevin ***@***.***>
Sent: Thursday, May 26, 2022 3:45 PM
To: ***@***.***>
Cc: ***@***.***>; ***@***.***>
Subject: Re: [microsoft/microsoft-ui-xaml] WinUI 3 C# Window Templates are missing in Visual Studio 2022 17.2.2 in Add new item dialogue. (Issue #7148)
Try reinstalling the templates (or check that they are selected in the below bundle):
1. Open Visual Studio Installer > Modify
2. Uncheck .NET desktop development > Modify
3. Check .NET desktop development > Modify
—
Reply to this email directly, view it on GitHub<#7148 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ATZA77NBRI5BGVSNFIVN353VL5I2ZANCNFSM5XAJFELQ>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Make sure sure you have the following installed on .net development & C++ desktop development. I agree WinUI tooling from defaults are a mess, Not sure why the Windows App SDK is not selected by default. Please MS fix this as it is wasting everyone's time !! |
I do not have it installed.
Screenshoots of installed stuff is attached.
I am using Visual Studio 20222 with Enterprise Version License….
Installed preview tools are:
1. Microsoft Windows App SDK 1.1.0-Preview 3
2. Microsoft SQL Server 2022 CTP 2.0
3. Microsoft Windows 11 Pro (Build-22621.1)
4. Microsoft Office 365 for Enterprise (Current Channel Preview) – Version 2204 Build - 15128.
From: Pinox ***@***.***>
Sent: Saturday, May 28, 2022 3:06 PM
To: microsoft/microsoft-ui-xaml ***@***.***>
Cc: engraneesahmad ***@***.***>; Mention ***@***.***>
Subject: Re: [microsoft/microsoft-ui-xaml] WinUI 3 C# Window Templates are missing in Visual Studio 2022 17.2.2 in Add new item dialogue. (Issue #7148)
@engraneesahmad<https://github.com/engraneesahmad>
Do u have .net 7 previews installed ? I had a similiar issue , can't remember anymore I think it was more MAUI related. Try unstalling all .net 7 preview if you have.
—
Reply to this email directly, view it on GitHub<#7148 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ATZA77MUAE7UYK44VCVYQKDVMHV2DANCNFSM5XAJFELQ>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
Have you u tried installing VS 2022 on something like "Windows Sandbox" just to make sure it not something with you current PC installation. |
OK I make virtual machine of windows 11 using VMWare then carry out clean installation then inform you. Give me some time…
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows
From: ***@***.***>
Sent: Saturday, May 28, 2022 7:01 PM
To: ***@***.***>
Cc: ***@***.***>; ***@***.***>
Subject: Re: [microsoft/microsoft-ui-xaml] WinUI 3 C# Window Templates are missing in Visual Studio 2022 17.2.2 in Add new item dialogue. (Issue #7148)
@engraneesahmad<https://github.com/engraneesahmad>
Have you u tried installing VS 2022 on something like "Windows Sandbox" just to make sure it not something with you current PC installation.
[image]<https://user-images.githubusercontent.com/5297255/170828727-f2688a39-0eda-4a84-bdde-ef40aa1133df.png>
—
Reply to this email directly, view it on GitHub<#7148 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ATZA77PDCUXSD6G3U6INM23VMIRMFANCNFSM5XAJFELQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I normally use Windows Sandbox, then there is no need to install Windows again. Also everything you install is only valid for the current session. Next start of sandbox and it empty again. I guess it depends if you already have a virtual image ;)) |
I updated VS 2022 Professional to 17.2.2 and now there is no template for ContentDialog. |
Also facing the same issue. Manually installed Windows App SDK 1.1.0 Preview 3 C# Visual Studio 2022 extension to no avail. |
I've spent five hours today on this issue - uninstalling Visual Studio, reinstalling, and so on. I've finally landed on this page and found it to be an issue that others have too. Would love to know if there is a better workaround than I am doing - copy and paste a different Page item and then rename the file and code name properties. |
[Edited given I mixed threads :)] Sorry @JonPerkinsOldGit and @engraneesahmad, and others. About the ContentDialog template, I believe we never added it to the WinAppSDK. It's the kind of thing we deprioritize against fixing bugs. It's not a big deal, and it's very convenient, but there is something else more important to do always. You know the feeling, right? |
I am also having this issue. Installed VS2022 17.2.3 and Windows App SDK 1.1.0. Created two seperate WinUI projects. One using Template Studio and another just using the "Blank, Packaged) WinUI template in VS. Neither had WinUI file templates in the Add New Item dialog. Currently attempting to unsintall VS2022 and reinstall it. Going to also try to install Windows App SDK v1.0.0 instead of v1.1.0 (@engraneesahmad mentioned that it worked fine for that version) |
Same problem here. I don't think I updated Visual Studio 2019 or project packages, but a couple of weeks ago I could see template items which are not listed there today (as I opened project again). Could this have something to do with windows update? |
An update on my situation if anyone here finds it helpful. I uninstalled all versions of visual studio on my machine (i had a couple), and reinstalled VS2022 with all of the options listed in the Tools for Windows App SDK page. From there, I used Template Studio to create a new app. Everything seemed to work fine for that app. I was able to see a WinUI item templates ins in the Add Item dialog. I also made sure to confirm the installation of Windows App SDK through the Nuget package manager. Weirdly enough, the version was actually v1.1.0. For this installation I did NOT use the extension found here. Perhaps using the extension was the issue? Seems a fresh install with just the workloads and components specified in the instructions worked. I think my issue was overall a result of misunderstanding/getting lost in the docs |
I also have this problem since the release of v1.1.0-preview3 extension. (i reinstalled windows and VS2022) I think this problem should be reported in Visual Studio team |
From what I have found the WinUI templates are present if you run Visual Studio 17.3 preview 1. However, on this preview build you cannot [Project -> Publish -> Create App Package] so in that case you have to revert back to the latest VS 17.2. I'm managing OK now that I've figured that out. Life at the leading edge eh? ;-) |
After running into the issue mentioned here: microsoft/WindowsAppSDK#2579 and losing templates, updating to VS 2022 17.3.0 Preview 1.1 now shows the extensions as installed with templates working again: |
Thanks, @japarson for the PR to fix the issue in Visual Studio |
…ates ## Problem In a [previous PR](#2289), I attempted to prevent the WinUI C# templates from appearing in projects unrelated to WinUI. To do so, I set the [ShowByDefault](https://docs.microsoft.com/en-us/visualstudio/extensibility/showbydefault-visual-studio-templates?view=vs-2022) property to `false`. When this property is `false`, the decision to show/hide the item templates falls to the [AppliesTo](https://docs.microsoft.com/en-us/visualstudio/extensibility/appliesto-element-visual-studio-templates?view=vs-2022) and [TemplateGroupID](https://docs.microsoft.com/en-us/visualstudio/extensibility/templategroupid-element-visual-studio-templates?view=vs-2022) properties. The C# templates currently hold the value `CSharp + SharedAssetsProject`. However, an examination of the capabilities for a WinUI project reveals that `SharedAssetsProject` is no longer present: ![image](https://user-images.githubusercontent.com/59936622/172943854-a7d108ed-453e-4849-844e-170489d4fca7.png) The C++ templates currently hold no value for `AppliesTo` and `TemplateGroupID`. ## Solution For the C# templates, we can adjust the value for `AppliesTo` to be `CSharp + WindowsAppSdk`. For the C++ templates, we can add the property `AppliesTo` with value `VisualC + WindowsAppSdk`. We can also add the property `TemplateGroupID` with value `WinRT-Native-UAP`, which comes from this table ([link](https://docs.microsoft.com/en-us/visualstudio/extensibility/templategroupid-element-visual-studio-templates?view=vs-2022)): ![image](https://user-images.githubusercontent.com/59936622/172949107-b4be14fc-33d1-466c-9227-2d9db61c1643.png) ## C# ![image](https://user-images.githubusercontent.com/59936622/172935775-e1120116-95bc-4f97-8034-53175686e3a3.png) ## C++ ![image](https://user-images.githubusercontent.com/59936622/172939101-6b791b67-d51d-4ca0-acd5-6014474f03ca.png) ## Work Item microsoft/microsoft-ui-xaml#7148 (cherry picked from commit ea92f45)
Same issue in Version 17.3.0 Preview 2.0 / WindowsAppSDK 1.1.1 |
…ates (#2641) ## Problem In a [previous PR](#2289), I attempted to prevent the WinUI C# templates from appearing in projects unrelated to WinUI. To do so, I set the [ShowByDefault](https://docs.microsoft.com/en-us/visualstudio/extensibility/showbydefault-visual-studio-templates?view=vs-2022) property to `false`. When this property is `false`, the decision to show/hide the item templates falls to the [AppliesTo](https://docs.microsoft.com/en-us/visualstudio/extensibility/appliesto-element-visual-studio-templates?view=vs-2022) and [TemplateGroupID](https://docs.microsoft.com/en-us/visualstudio/extensibility/templategroupid-element-visual-studio-templates?view=vs-2022) properties. The C# templates currently hold the value `CSharp + SharedAssetsProject`. However, an examination of the capabilities for a WinUI project reveals that `SharedAssetsProject` is no longer present: ![image](https://user-images.githubusercontent.com/59936622/172943854-a7d108ed-453e-4849-844e-170489d4fca7.png) The C++ templates currently hold no value for `AppliesTo` and `TemplateGroupID`. ## Solution For the C# templates, we can adjust the value for `AppliesTo` to be `CSharp + WindowsAppSdk`. For the C++ templates, we can add the property `AppliesTo` with value `VisualC + WindowsAppSdk`. We can also add the property `TemplateGroupID` with value `WinRT-Native-UAP`, which comes from this table ([link](https://docs.microsoft.com/en-us/visualstudio/extensibility/templategroupid-element-visual-studio-templates?view=vs-2022)): ![image](https://user-images.githubusercontent.com/59936622/172949107-b4be14fc-33d1-466c-9227-2d9db61c1643.png) ## C# ![image](https://user-images.githubusercontent.com/59936622/172935775-e1120116-95bc-4f97-8034-53175686e3a3.png) ## C++ ![image](https://user-images.githubusercontent.com/59936622/172939101-6b791b67-d51d-4ca0-acd5-6014474f03ca.png) ## Work Item microsoft/microsoft-ui-xaml#7148 (cherry picked from commit ea92f45) Co-authored-by: James Parsons <japarson@microsoft.com>
I can confirm this as well. Item templates are not available. |
I am having the same issue. I have tried installing the experimental template extension but the install fails. I have also tried installing vs preview 2 and the templates still don't show up. What is the solution? |
Have tried that to no avail, unfortunately. EDIT: I managed to get it working but I'm hoping an update comes out which fixes this for real. I went to Extensions > Manage Extensions > Installed, and found "Windows App SDK C# VS2022 Templates" and clicked revert. It reverted to version 1.0.3.xxx and is now working. |
We're experiencing the same and have had to revert as above. |
This Solved my Problem Also 👯♂️ |
I am on 17.3 Preview 2 and the Revert button is not available. I only get Uninstall. I already tried uninstalling and reinstalling but nothing changed. I still don't have the templates. |
Fixed with Windows App SDK 1.1.2, see release notes for more info. cc: @evelynwu-msft |
@gabbybilka Upgrading the nuget to Windows App SDK 1.1.2 in a new project doesn't cut it for me. I still can't see the Item templates. |
download new extension |
@ghost1372 Thanks. @gabbybilka Item templates disappeared again for me. Neither updating to WASDK 1.1.2, updating to VS 17.3.0 Preview 3.0, or uninstalling/reinstalling the templates from the VS installer got them working. Only installing the extension from the above link fixed the problem, and this requirement isn't mentioned anywhere in the docs or WASDK release notes as far as I can see. |
Same problem here, only got it working after manually downloading from https://aka.ms/windowsappsdk/1.1/1.1.3/vsix-2022-cs and installing this version of the addon. |
Just did reinstall of Visual Studio 2022 17.3.4 and C# UI templates are installed but do not show up in the Add New Item dialog. Same problem as others have mentioned. Manage Extensions screen shows Windows App SDK C# VS2022 Templates version 1.1.3.80461806 is installed. For UWP projects the UI templates are available. I had previously tried all the above recommendations but none worked. Still looking for solution. Update: |
Can it be used having VMware already installed. Once before I tried to use it but it do not let VMware to run until unless we disable it?
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows
From: ***@***.***>
Sent: Saturday, May 28, 2022 7:10 PM
To: ***@***.***>
Cc: ***@***.***>; ***@***.***>
Subject: Re: [microsoft/microsoft-ui-xaml] WinUI 3 C# Window Templates are missing in Visual Studio 2022 17.2.2 in Add new item dialogue. (Issue #7148)
OK I make virtual machine of windows 11 using VMWare then carry out clean installation then inform you. Give me some time…
I normally use Windows Sandbox, then there is no need to install Windows again. Also everything you install is only valid for the current session. Next start of sandbox and it empty again.
—
Reply to this email directly, view it on GitHub<#7148 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ATZA77IDEVYHEWPQAM2Q6U3VMISMFANCNFSM5XAJFELQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
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. |
Describe the bug
WinUI 3 C# Window Templates are missing in Visual Studio 2022 17.2.2 in Add new item dialogue.
Steps to reproduce the bug
WinUI 3 C# Window Templates are missing in Visual Studio 2022 17.2.2 in Add new item dialogue.
Expected behavior
No response
Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.1 Preview 3: 1.1.0-preview3
Windows app type
Device form factor
Desktop
Windows version
Windows Insider Build (xxxxx)
Additional context
Windows 11 (21H2) Build 22621.1
The text was updated successfully, but these errors were encountered: