Visual Studio 2019 - Set a default extension for a file type

Mansoor Ahmed Memon

Visual Studio uses .cpp for cpp source files and .h for cpp header files by default. I want to change the extensions to .cc and .hh, respectively. Is there a way to configure Visual Studio?

PS: I know this is not very important but, I just like it that way.

Jazimov

Your question's solution is, quite frankly, of dubious practical value. While you might satisfy you're "I just like it that way" preference, you're trying to change convention--expected, standardized extensions for one of the world's most popular programming languages and sealing yourself off from many third-party tools and technologies by doing so. You'll have difficulty sharing your code or integrating it; even if you write T4 templates, batch files, project item templates, etc., to support your preference, it's at a very high cost.

The short answer is that there is no quick-fix for doing what you're asking. The long story is that you could toil away and make progress towards your goal, but you'll experience a major setback with every file extension you're trying to change.

My advice: Stick with the expected file extensions and devote your efforts to mastering C# instead.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to set default header file extension in Visual Studio 2013?

How to set a default file as the first file to run in visual studio code?

Visual Studio Code : The 'C#' extension is recommended for this file type

Porting WinDbg plugin to Visual Studio 2019 extension

DotVVM extension install errors on Visual Studio 2019

How adapt extension to Visual Studio 2019?

Visual Studio 2019 is not detected by Github extension

File is locked by Visual Studio 2019

Visual Studio 2019 how to open the default tabs

Breakpoint set but not yet bound in Visual Studio 2019

Incompatible project type .deployproj (Visual Studio 2019)

Is there a Visual Studio Installer Project type for Visual Studio 2019?

How to set language for a extension in Visual Studio Code

How to set colors in a Visual Studio Code extension

Is it safe to edit .csproj file in Visual Studio 2019?

visual studio 2019 open solution file incompatible

Cant open a file in Visual Studio 2019

How to set default application for a specific file extension

Can I install "JSON Viewer" extension for Visual Studio 2019?

Visual Studio 2019 Extension That Shows Errors inside the Code Editor

Unable to download any Microsoft Visual Studio 2019 Extension

How to set an entire folder of files to copy always (or how to make files come in copy always as default) in Visual Studio 2019

Organizing a huge .css file with Visual Studio extension?

How to define the HTML file extension in Visual Studio?

Permanently set default zoom in Visual Studio

Set up default browser in the Visual Studio Code

Set default debug project in visual studio

Visual Studio 2019: Find and Replace does not search *.sql by default

How to default Visual Studio 2019 Script Documents to minimized?