How to make Visual Studio 2010 recognize file exte

2019-06-16 20:04发布

There was a solution for VS 2005 here:

http://www.dotnetmonster.com/Uwe/Forum.aspx/vs/3298/Make-Visual-C-recognize-file-extensions-as-C-files

But doesn't find same registry for VS2008 and VS2010. So where can I find the solution update for this ? Thanks.

2条回答
小情绪 Triste *
2楼-- · 2019-06-16 20:37

I don't think it is any different. You however have to change the version number in the registry key name HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Languages\File Extensions. VS2008 is 9.0, VS2010 is 10.0

These kind of registry hacks don't scale very well. It stops working when you open the project on another machine or use a different VS version. As you found out. Just renaming the file is the much lower pain-point.

查看更多
爷、活的狠高调
3楼-- · 2019-06-16 20:45

If what you're looking for is syntax highlighting for different extensions in the VS 2010 editor: Go to Tools -> Options -> TextEditor -> File Extensions and enter the extension.

查看更多
登录 后发表回答