Add C file to Visual Studio

If I'm understanding correctly, you want to directly add a C file to the project. Unfortunately, I don't think VS provides any means to do so; you'll just have to rename newly added files.


You can rename a file from within the IDE. Right click the file and hit rename (or click on the file and push F2).

Click file, push F2. http://blackninjagames.com/images/rename_file.PNG


When you "Add New Item", simply include the extension in the "Name:" field and it will override the default for the selected file type.


I've created new item template (add C File Plugin),

You can download: Visual Studio - New Item Template.zip

Extract the ZIP file to:

C:\Users\USERNAME\Documents\Visual Studio 2013\Templates\ItemTemplates\

or (for VS2012):

C:\Users\USERNAME\Documents\Visual Studio 2013\Templates\ItemTemplates\Visual C++ Project

or if you want to put it under "Code" sub category:

C:\Users\USERNAME\Documents\Visual Studio 2013\Templates\ItemTemplates\Visual C++ Project\Code

Or you can read this Tutorial to create custom item template for Visual Studio.

enter image description here