ASP.NET Core add new Items at the Controllers Folder

nj 1 Reputation point
2020-09-30T06:15:36.607+00:00

Hello I have the following problem, I'm doing the tutorial ASP.NET Core MVC app and in one part I want
I add a new item to the controller folder and like on the first picture I should add the controller class
now it is ASP.NET Core and in my case Visual C#. Now my question how do I change it for me with
there is also the type ASP.NET Core and no longer Visual C#?29297-1.png29298-2.png

Developer technologies Visual Studio Setup
Developer technologies Visual Studio Other
{count} votes

1 answer

Sort by: Most helpful
  1. Tianyu Sun-MSFT 34,436 Reputation points Microsoft External Staff
    2020-10-01T02:14:13.593+00:00

    Hello nj,

    Thanks for posting in Microsoft Q&A forum.

    You can add a Controller Class - Empty file from Controllers > right-click > Add > New Item > Installed > Visual C# > ASP .NET Core > Web > Controller Class – Empty.

    29544-1.png

    Or, you can add a MVC Controller - Empty file from Controllers > right-click > Add > Controller… > Installed > Controller > MVC Controller - Empty.

    29489-2.png

    Actually, with the update of Visual Studio, there are some improvements and changes for the layout, UI… So, as you can see, the ASP .NET Core type is listed(designed) under the Visual C#. You cannot change it, but if you want, if possible, you can suggest a feature directly to VS Product Team from here: Suggest a feature.

    Besides, it is obvious that the document should be updated and improved, I will then report this issue to VS Product Team.

    Feel free to let me know if you have any other concern.

    Sincerely,
    Tianyu

    • If the answer is helpful, please click "Accept Answer" and upvote it.
      Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.