Skip to content

VFT: add new item to project categories doesn't have a root element #804

Closed

Description

@smoothdeveloper

When I right click on a F# project and choose "Add New Item...", I get shown this dialog:

image

While for a C# project, I get shown this dialog:

image

It doesn't make sense to have to pick "Code" in the F# dialog to be able to add a simple code file.

I guess the proper fix would be to have "Visual F# Items" node scoping "Data", "General" and "Code" items.

It would be nice to have "Add Module" similar to C# "Add Class", "Add Component" etc, so most of the time we won't deal with the dialog.

Activity

  1. eriawan commented on Dec 17, 2015

    @eriawan
    Member

    @smoothdeveloper

    This is very cool and excellent bug report! 👍

    I often notice this, but I didn't realize that F# project's item template behave differently from C#.
    My guess is, it's in the F# project system.

    Maybe it's time to revisit the use of Visual Studio CPS instead of the current F# project model.

  2. abelbraaksma commented on Dec 23, 2015

    @abelbraaksma
    Contributor

    Can you explain and/or add details how to repro? I tried this with VS2015, Enterprise Ed, an F# 4.0 project (w/o Update 1), F# PowerTools installed, and I right-click in the solution like this:

    fsharp-bug-804-1

    Then I get the following screen (which, also surprisingly, shows two identical items and when selecting either of them, they always add the wrong standard open-statements open Android.xxx, but that may be another issue). It automatically selects the F# templates, and it appears to have a "root":

    fsharp-bug-804-2

  3. smoothdeveloper commented on Dec 23, 2015

    @smoothdeveloper
    ContributorAuthor

    I get the same on two machines on which I just installed Community Edition (Update 1).

    The screen shot I took was on pretty much vanilla VS that I just installed.

    I can't repro on VS 2013 Professional installed on one of my machines and will check tomorrow on the other.

    I also notice that in a websharper project (I installed the vsix after I reported this bug so it's not related to it) the dialog is just empty and I can't use the Add New Item dialog on the project, but it works for other projects in the same solution.

    image

    Microsoft Visual Studio Community 2015
    Version 14.0.24720.00 Update 1
    Microsoft .NET Framework
    Version 4.6.01055
    
    Installed Version: Community
    
    Visual Basic 2015   00322-20000-00000-AA921
    Microsoft Visual Basic 2015
    
    Visual C# 2015   00322-20000-00000-AA921
    Microsoft Visual C# 2015
    
    Visual C++ 2015   00322-20000-00000-AA921
    Microsoft Visual C++ 2015
    
    Visual F# 2015   00322-20000-00000-AA921
    Microsoft Visual F# 2015
    
    ASP.NET and Web Tools 2015.1 (Beta8)   14.1.11106.0
    ASP.NET and Web Tools 2015.1 (Beta8)
    
    ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
    For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563
    
    ASP.NET Web Frameworks and Tools 2013   5.2.30624.0
    For additional information, visit http://www.asp.net/
    
    Common Azure Tools   1.5
    Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
    
    GitHub.VisualStudio   1.0
    A Visual Studio Extension that brings the GitHub Flow into Visual Studio.
    
    JetBrains ReSharper Ultimate 10.0.2   Build 104.0.20151218.120627
    JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2015 JetBrains, Inc.
    
    KofePackagePackage Extension   1.0
    KofePackagePackage Visual Studio Extension Detailed Info
    
    Microsoft Azure Mobile Services Tools   1.4
    Microsoft Azure Mobile Services Tools
    
    Microsoft MI-Based Debugger   1.0
    Provides support for connecting Visual Studio to MI compatible debuggers
    
    NuGet Package Manager   3.3.0
    NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
    
    Package Installer   1.5.63
    Makes it easier, faster and more convenient than ever to install Bower, npm, JSPM, TSD and NuGet packages to any project
    
    Paket.VisualStudio   1.0
    Manage your Paket dependencies from Visual Studio!
    
    PowerModeOptionsPackage Extension   1.1.5
    PowerModeOptionsPackage Visual Stuido Extension Detailed Info
    
    PreEmptive Analytics Visualizer   1.2
    Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.
    
    Python Tools for Visual Studio   2.2.31105.00
    Python Tools for Visual Studio provides IntelliSense, projects, templates, Interactive windows, and other support for Python developers.
    
    Python Tools for Visual Studio - Django Integration   2.2.31105.00
    Provides templates and integration for the Django web framework.
    
    Python Tools for Visual Studio - Profiling Support   2.2.31105.00
    Profiling support for Python projects.
    
    SQL Server Data Tools   14.0.50616.0
    Microsoft SQL Server Data Tools
    
    TypeScript   1.7.4.0
    TypeScript for Microsoft Visual Studio
    
    Visual C++ for Cross Platform Mobile Development   1.0
    Visual C++ for Cross Platform Mobile Development
    
    Visual C++ for Cross Platform Mobile Development   1.0
    Visual C++ for Cross Platform Mobile Development
    
    Visual F# Power Tools   2.2.0
    A collection of additional commands for F# in Visual Studio
    
    WakaTime   1.0
    
    
    Web Essentials 2015   1.0.198
    Adds many useful features to Visual Studio for web developers.
    
  4. smoothdeveloper commented on Dec 25, 2015

    @smoothdeveloper
    ContributorAuthor

    Actually, when I first launch Visual Studio, I pick the C++ environment (I'm used to the keyboard shortcuts) and it has an effect on the template tree.

    I think that might be the reason why I'm seeing this.

  5. smoothdeveloper commented on Apr 7, 2016

    @smoothdeveloper
    ContributorAuthor

    Any update on this issue with VS 15 preview?

    On a default install with F# ticked, after choosing C++ style on first launch splash screen, is the hierarchy correct?

  6. added
    Impact-Medium
    on Jul 18, 2016
  7. saul commented on Jan 2, 2017

    @saul
    Contributor

    This is what I see on VS 2017 RC and master, but I don't recall what I selected at the first launch splash screen unfortunately:

    image

  8. smoothdeveloper commented on Feb 2, 2017

    @smoothdeveloper
    ContributorAuthor

    image

    @saul, this seems to work properly in VS2017, I've picked C++ environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugImpact-Medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions