简体   繁体   中英

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

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM