Conversation
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
I think it broke again in Version 17.3.0 Preview 2.0 |
@TRadigk Could you explain what you mean? This fix hasn't been released yet so it shouldn't be possible for it to have regressed. |
…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:  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)):  ## C#  ## C++  ## Work Item microsoft/microsoft-ui-xaml#7148 (cherry picked from commit ea92f45)
…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:  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)):  ## C#  ## C++  ## Work Item microsoft/microsoft-ui-xaml#7148 (cherry picked from commit ea92f45) Co-authored-by: James Parsons <japarson@microsoft.com>
It seems that I have missed reading this important reply. Thanks for your patience. The original reply: @evelynwu-msft Hello. Sorry to disturb you. I use VS 17.3 preview 2 but the same issue encountered. Pictures: Template missing: The elementary WinUI VS extensions has been installed: I use VS 17.3p2: Templates has been successfully installed. I don't think that the issue has been fixed in the current version. 😞 |
Thanks for the information. I was quite certain I had no trouble working with the templates recently, thus assuming prior the latest VS preview update. |
|
@TRadigk This will be addressed in the upcoming servicing update for 1.1. Unfortunately, the only workaround until then is to install the WinAppSdk 1.0.4 extension (C# Visual Studio 2022 extension and C++ Visual Studio 2022 extension) and manually upgrade the package version when creating a new project (the package upgrade step can be skipped if you're working with an existing project). |
|
@TRadigk My mistake, the servicing update with the fixed templates has already been released; updating your installed extension to 1.1.2 should resolve this problem for you: C# Visual Studio 2022 extension and C++ Visual Studio 2022 extension. |




Problem
In a previous PR, I attempted to prevent the WinUI C# templates from appearing in projects unrelated to WinUI. To do so, I set the ShowByDefault property to
false. When this property isfalse, the decision to show/hide the item templates falls to the AppliesTo and TemplateGroupID properties.The C# templates currently hold the value

CSharp + SharedAssetsProject. However, an examination of the capabilities for a WinUI project reveals thatSharedAssetsProjectis no longer present:The C++ templates currently hold no value for
AppliesToandTemplateGroupID.Solution
For the C# templates, we can adjust the value for
AppliesToto beCSharp + WindowsAppSdk.For the C++ templates, we can add the property
AppliesTowith valueVisualC + WindowsAppSdk. We can also add the propertyTemplateGroupIDwith valueWinRT-Native-UAP, which comes from this table (link):C#
C++
Work Item
microsoft/microsoft-ui-xaml#7148