Can I tell Visual Studio how treat a file with a custom file extension?

dev.e.loper picture dev.e.loper · Aug 16, 2010 · Viewed 11k times · Source

Can I tell Visual Studio how treat a file with a custom file extension? I want to be able to open a file with ".xxx" extension in Visual Studio and have CSS highlighting.

I've tried to do it by going to VS -> Tools -> Options -> Text Editor -> File Extension but in the Editor drop down there is nothing to specify "treat it as CSS".

Answer

jedi.jesse picture jedi.jesse · Jan 14, 2016

In Visual Studio go to Tools > Options > Text Editor > File Extension

There you can add specific extensions and choose which 'Editor' Visual Studio uses for that extension.