Good day,

I want to add a new file extension for Visual Studio 2013.

enter image description here

enter image description here

enter image description here

Added everywhere where msdn requires a new .fwd extension - but intellisense does not see this file and in the Solution Explorer file without an icon. I would like this and that.

PS Before that I worked with classname_fwd.h (file with Forward Declaration and typedef's). Now I decided to switch to a “formalized relationship” with this class extension. How fraught it will be?
Thanks in advance!

  • You complicate things too much. No need to invent file types just for the sake of classifying them, if they are processed identically with an existing type. What is bad about class_fwd.h , class.fwd.h and so on? - Athari
  • for semantics. cpp / h / inl (templates) / fwd (forward declaration). About class.fwd.h not sure what will be worked out on other platforms (iOS, Mac, Android) - rikimaru2013
  • one
    Under Windows it is strictly determined that the extension is a section after the last point. I suspect that linuksoid tools act according to the same logic. - Athari

1 answer 1

You can add a file with an arbitrary extension in three steps:

  1. Open the file properties through the context menu and set тип элемента in the Заголовок C/C++ (needed for assembly)

context menu -> properties

  1. In the environment settings, in the текстовый редактор section add a new extension for Microsoft Visual C++ (for highlighting and Intellisense )

Environment settings

  1. In the file properties panel, set тип файла to a C++ заголовочный файл (needed for the icon)

file properties panel

PS also does not interfere in the project parameters to add your extension to the включаемые расширения

Project parameters