Move file associations from Visual Studio 2005 to 2008

家住魔仙堡 提交于 2019-12-20 03:03:01

问题


Both Visual Studio 2005 and Visual Studio 2008 is installed on my PC, but when I open a .aspx or .master file from Explorer, it opens in 2005. I would like them to open in 2008.

I could change the file associations manually, but there are quite a lot of file extensions to go through.

Is there an easy way to give all the file associations back to 2008?


回答1:


maybe this: Options -> Environment -> General -> Restore File Associations




回答2:


You should be able to do it like this.

First create a text file (assocs) with all your existing settings

assoc | findstr -i VisualStudio > assocs

Next edit this file change 8.0 to 9.0 in cases like:

.vbdproj=VisualStudio.vbdproj.8.0 -> .vbdproj=VisualStudio.vbdproj.9.0

Next save this file and run the following command to create a batch file to alter the settings:

for /f "tokens=1-10 delims==" %i in (assocs.) do @echo assoc %i=%j >> new_assocs.bat

Finally run the batch file:

new_assocs.bat


来源:https://stackoverflow.com/questions/1326506/move-file-associations-from-visual-studio-2005-to-2008

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!