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

Item templates are missing #365

Closed
srivatsn opened this issue Aug 18, 2016 · 16 comments
Closed

Item templates are missing #365

srivatsn opened this issue Aug 18, 2016 · 16 comments
Assignees
Labels
Bug Bash Issues to be handled during our bug fixing push Feature Request Request for a new feature, or new scenario to be handled. Feature-Data-Designers Issues that affect the DataSet designer, or Data Sources window. Feature-WinForms Features related to bringing up the Windows Forms designer and related features. Feature-XAML Features related to the XAML designer and display and manipulation of XAML files. Parity-Legacy-Feature Missing features from the legacy project system. Triage-Investigate Reviewed and investigation needed by dev team
Milestone

Comments

@srivatsn
Copy link
Contributor

In the latest VS builds, clicking on AddItem doesn't show most item templates. This is with the new installer and maybe some setup authoring regression.

@srivatsn srivatsn added the Bug This is a functional issue in already written code. label Aug 18, 2016
@srivatsn srivatsn added this to the 1.0 Preview 5 - 1 milestone Aug 18, 2016
@333fred
Copy link
Member

333fred commented Aug 19, 2016

Initial comments:
It appears as though this is something specific to the .NET Core template. If I create a standard Console app and throw a breakpoint in the AbstractAddClassProjectCommand handler, it gets hit (so I know that it's invoking our project system and not old csproj) and the templates show up correctly. I need to dig more into why the templates aren't showing up for .NET Core apps.

@srivatsn srivatsn modified the milestones: 1.0 Preview 5 - 1, 1.0 Preview 5 Aug 22, 2016
@333fred
Copy link
Member

333fred commented Aug 25, 2016

I've tracked down why this is occurring. The existing template filtering mechanism that determines what templates to show to a project doesn't understand the difference between .NET Core and .NET Framework. In the filtering process, it only looks at the TFM version number, not the full TFM. The TFM version number for us is 1.0, and the minimum for almost all the preexisting templates is 2.0. Therefore, the templates don't show up. I've tested artificially increasing our version number to 3.0, and that does cause all the missing templates to show up again.

@davkean
Copy link
Member

davkean commented Aug 25, 2016

Great work!

Sri and I talked offline, there's a few things that I see are going to need to change with the templates:

  1. We should remove the '2.0' from them; it's meaningless. We don't support .NET 1.x templates anyway.
  2. They also add references in some cases - in the case of Class.cs it adds System.dll - there's no such dll in .NET Core, it's not even needed for the template in full .NET Framework. We should remove them on a case-by-case basis.
  3. In some cases, we won't want them to show up at - in these cases, we should make use of capabilities - to hide them from projects without those capabilities. Make note - in some cases, we'll need to extend the old project system to return these capabilities to make that happen.

@333fred
Copy link
Member

333fred commented Aug 25, 2016

It appears that the file we need to edit, at least for the standard templates such as Class, is VS_Install_Root\Common7\IDE\ItemTemplates\Microsoft.VisualStudio.Templates.CS.ManagedCore.Resources.en-US.Item..vstman. VS appears to ignore the RequiredVersionNumber field in the actual vstemplate file, even if the RequiredVersionNumber field is entirely absent from the vstman file.

@srivatsn srivatsn added Feature Request Request for a new feature, or new scenario to be handled. Parity-Legacy-Feature Missing features from the legacy project system. Parity-XProj Missing features from xproj/project.json project system from Visual Studio 2015. and removed Bug This is a functional issue in already written code. labels Aug 26, 2016
@333fred
Copy link
Member

333fred commented Aug 29, 2016

This is a list of all templates showing up when adding a new item in an old csproj:

Category Template Name Status References Notes
Code Class 🚧 System
Code Interface 🚧 System
Code Code File 🚧 N/A
Data DataSet System, System.Data, System.Xml
Data LinqToSQLObjects_CS System, System.Data, System.Xml Does this belong?
Data Service-based Database N/A Not being included
Data XML File 🚧 N/A
Data XML Schema 🚧 N/A
Data XSLT File 🚧 N/A
General Component Class System
General Application Configuration File N/A
General Application Manifest File 🚧 N/A
General Assembly Information File System
General Bitmap File 🚧 N/A
General Code Analysis Rule Set ✔️ N/A
General Cursor File N/A
General Debugger Visualizer System, System.Drawing, System.Windows.Forms, Microsoft.VisualStudio.DebuggerVisualizers
General Icon File 🚧 N/A
General Installer Class N/A Not being included
General Resources File 🚧 N/A
General Runtime Text Template N/A
General Settings File N/A
General Text File 🚧 N/A
General Text Template N/A
General Windows Script Host N/A
General Windows Service N/A
General Directed Graph Document (.dgml) ✔️ N/A
WinForms Inherited Form N/A No WinForms
WinForms Inherited User Control N/A No WinForms
WinForms Windows Form N/A No WinForms
WinForms About Box N/A No WinForms
WinForms Custom Control N/A No WinForms
WinForms MDI Parent Form N/A No WinForms
WPF User Control (WPF) N/A No WPG
SQL SQL Server Unit Test N/A

@333fred
Copy link
Member

333fred commented Aug 29, 2016

@srivatsn @davkean The ones with ❓, I'm not sure whether we want them to show up or not. Input would be appreciated.

@333fred
Copy link
Member

333fred commented Aug 30, 2016

Sri and I talked a bit offline. For now, what we're going to do is remove the min version from the templates here that we'd like to have show up. That'll get us enough filtering for it to everything to appear in preview 5, and then I'll move to higher priority stories for preview 5. Once that's completed, we'll circle back around and implement the capability-based filtering.

@davkean
Copy link
Member

davkean commented Aug 30, 2016

@srivatsn Don't agree on the priority - well want to remove the assembly references for at least the common templates such as interface, class, etc so that you don't get an error on adding them.

@srivatsn
Copy link
Contributor Author

Yes I'm saying we should do the work needed to get the templates we want to show up. I was saying that if we need to introduce capabilities to filter out templates that dont apply to Core (say MDI parent form) let's instead filter for now based on TFM check and do the real work later.

@333fred
Copy link
Member

333fred commented Aug 30, 2016

VBProj Templates:

Category Template Name Status References Notes
Code Module 🚧 N/A
Code Interface 🚧 N/A
Code Component Class System
Code Code File 🚧 N/A
Code COM Class N/A
Code Transactional Component N/A
Data DataSet System, System.Data, System.Web.Services, System.Xml
Data LinqToSQLObjects_VB System, System.Data, System.Xml Located in DataDesign
Data Service-based Database System, System.Data, System.Xml
Data XML File 🚧 N/A
Data XML Schema 🚧 N/A
Data XML To Schema ✔️ N/A
Data XSLT File 🚧 N/A
General Application Configuration File N/A
General Application Manifest File 🚧 N/A
General Bitmap File 🚧 N/A
General Code Analysis Rule Set ✔️ N/A
General Cursor N/A
General Icon File 🚧 N/A
General Installer Class System, System.Configuration.Install
General Resources File 🚧 N/A
General Runtime Text Template N/A
General Settings File N/A
General Text File 🚧 N/A
General Text Template N/A
General Windows Service N/A
General Directed Graph Document ✔️
WPF User Control (WPF) System, WindowsBase, PresentationCore, PresentationFramework
SQL Server SQL Server Unit Test N/A
Windows Forms Windows Forms System, System.Drawing, System.Windows.Forms
Windows Forms User Control System, System.Drawing, System.Windows.Forms
Windows Forms About Box System, System.Drawing, System.Windows.Forms
Windows Forms Custom Control System, System.Drawing, System.Windows.Forms
Windows Forms Dialog System, System.Drawing, System.Windows.Forms
Windows Forms Explorer Form System, System.Drawing, System.Windows.Forms
Windows Forms Login Form System, System.Drawing, System.Windows.Forms
Windows Forms MDI Parent Form System, System.Drawing, System.Windows.Forms
Windows Forms Splash Screen System, System.Drawing, System.Windows.Forms
Windows Forms Inherited Form System, System.Drawing, System.Windows.Forms Currently showing up.
Windows Forms Inherited User Control System, System.Drawing, System.Windows.Forms Currently showing up.

@srivatsn srivatsn modified the milestones: 1.0 RTM, 1.0 Preview 5 - 2 Sep 14, 2016
@srivatsn srivatsn modified the milestones: 1.1, 1.0 RTM Nov 10, 2016
@srivatsn srivatsn removed the Parity-XProj Missing features from xproj/project.json project system from Visual Studio 2015. label Feb 28, 2017
@srivatsn srivatsn modified the milestones: 16.0, 15.3 Feb 28, 2017
@panopticoncentral
Copy link
Contributor

The VS extensibility templates are also not showing up.

@jmarolf jmarolf self-assigned this Nov 26, 2018
@davkean davkean added Feature-XAML Features related to the XAML designer and display and manipulation of XAML files. Feature-WinForms Features related to bringing up the Windows Forms designer and related features. Feature-Data-Designers Issues that affect the DataSet designer, or Data Sources window. labels Dec 12, 2018
@jjmew jjmew modified the milestones: 16.0, 16.1 Dec 18, 2018
@davidwengier davidwengier added this to Winforms/WPF in David Wengier Mar 26, 2019
@jjmew jjmew modified the milestones: 16.1, 16.X Apr 2, 2019
@davidwengier davidwengier modified the milestones: 16.X, 16.2 Apr 11, 2019
@davidwengier davidwengier moved this from Winforms/WPF to In progress in David Wengier Apr 25, 2019
@davidwengier davidwengier moved this from In progress to In review in David Wengier May 3, 2019
@davidwengier
Copy link
Contributor

WPF item templates will be in a future release of 16.1. Windows Forms templates are still in progress.

@hicks86
Copy link

hicks86 commented May 15, 2019

Just clarifying, that this is issue is also related to unit test templates not appearing for a .NET Core Unit Test projects (Add new item)?

@davkean
Copy link
Member

davkean commented May 15, 2019

@hicks86 please file a new bug around what templates you would like to see.

@jmarolf
Copy link
Contributor

jmarolf commented Jun 10, 2019

Winforms fixed with AD#175581

@jmarolf jmarolf modified the milestones: 16.2, 16.X Jun 11, 2019
@jmarolf jmarolf removed their assignment May 21, 2020
@jjmew jjmew modified the milestones: 16.x, Backlog Aug 17, 2020
@jjmew jjmew added the Triage-Investigate Reviewed and investigation needed by dev team label Aug 17, 2020
@tmeschter tmeschter self-assigned this Nov 25, 2020
@tmeschter tmeschter added the Bug Bash Issues to be handled during our bug fixing push label Nov 25, 2020
@jjmew jjmew added this to To do in Bug Bash Nov 25, 2020
@tmeschter
Copy link
Contributor

I've done some spot checking, and many of the things that were previously missing are now showing up. I'm going to close this issue in favor of creating new issues for specific missing templates (if any) as they come up.

Bug Bash automation moved this from To do to Done Dec 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bash Issues to be handled during our bug fixing push Feature Request Request for a new feature, or new scenario to be handled. Feature-Data-Designers Issues that affect the DataSet designer, or Data Sources window. Feature-WinForms Features related to bringing up the Windows Forms designer and related features. Feature-XAML Features related to the XAML designer and display and manipulation of XAML files. Parity-Legacy-Feature Missing features from the legacy project system. Triage-Investigate Reviewed and investigation needed by dev team
Projects
No open projects
David Wengier
  
In review
Development

No branches or pull requests

9 participants