简体   繁体   中英

How to register custom file extension to JavaScript editor in Visual Studio 2010/2012?

(Also refer the original post on MSDN)

I have a very simple requirement which is to edit my own file extension (eg xsjs, xsapp...) with JavaScript editor in Visual Studio 2010/2012. Of course, these file extensions are fully ECMA standard compatible.

When I came to Tools -> Options -> Text Editor -> File Extension and added my own extension, there is no JavaScript editor at all:( Then I chose the most likely option "Script Editor" (see figure below) and applied changes. But it didn't work for any of the registered extensions.

Am I missing something here? Any one tells me how to do that?

  1. Script editor is what you need. Afaik, there is no "javascript editor".

  2. It's working for me. can you please explain what do you mean by "didn't work"

It's not currently possible to do it in any version of Visual Studio. I just got confirmation from http://connect.microsoft.com/VisualStudio/feedback/details/748574/cannot-register-custom-file-extension-to-javascript-editor-in-visual-studio-2010-2012 I'm considering to use other editors (eg Eclipse) to accomplish the task.

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