Visual Studio 2017/2019 create new file select last created file type by default setting

Xiao Han 1 Reputation point
2021-02-16T13:38:20.123+00:00

I am wondering if there is any settings or configuration in Visual Studio 2017/2019 Professional edition or above can automatically select the last file type I created a new file with while I use hot-key Ctrl+N?

I am using a work machine, Windows 10 pro and Visual studio 2019 Pro, all to the latest update. Recently after rebuild the OS, I found using Ctrl+N, I can no longer create a new file using the last file type I created before, it's always default to text file now.

This slow down my actions and daily tasks. I am wondering if there is any settings or certain permission Visual Studio may require but I am not aware of would cause behavior change like this.

Thank you.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,026 questions
Visual Studio Setup
Visual Studio Setup
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
1,031 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Michael Taylor 53,396 Reputation points
    2021-02-16T15:21:04.547+00:00

    Ctrl+N is for a general new file and therefore it defaults to the General category. If you have a project open and want to add a file to it then use Ctrl+Shift+A which is the keystroke for adding a new file to a project. This will default to the project's category (e.g. C#) and will remember what your last selection was. For example if you recently used a C# source file then it'll default to that. The defaults are per category.

    1 person found this answer helpful.

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.