Customizing the Places Bar in Visual Studio 2008

你说的曾经没有我的故事 提交于 2019-12-23 23:06:25

问题


Has anybody succeeded in customizing the Places Bar for VS 2008? My customizations from VS 2005 did not transfer to 2008 (obviously), and no matter what I do with the registry, I cannot make my custom places appear on the Open dialogs. I have read and applied the relevant MS KB article, to no avail.

This used to work fine with VS 2005, so it may well be a VS 2008 bug, but I may be wrong trying the same approach.


回答1:


some observations:

VS2008 uses now Common File Dialog. With Powertoys TweakUK i was able to set all places to 'none' and the VS2008 'Open File' dialog becomes empty.

Unfortunately VS2008 ignores user defined places or directories, and shows instead the default places: 'Desktop', 'standard_project_folder', 'My Computer'.

With Sysinternals RegMon i see that Registry Key [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\comdlg32\PlacesBar] gets read on ctrl+o...altough the places defined in here are still being ignored.




回答2:


VS2005 and VS2008 (sp1 anyway) both still use the following registry Key structure

So, for vs2008, create these reg paths.

HKCU/Software/Microsoft/VisualStudio/9.0/Open Find/Places/UserDefinedPlaces/Place0/Path = (some path

HKCU/Software/Microsoft/VisualStudio/9.0/Open Find/Places/UserDefinedPlaces/Place1/Path = (another path)

VS2008 Example:

HKCU/Software/Microsoft/VisualStudio/9.0/Open Find/Places/UserDefinedPlaces/Place0/Path = "C:\Dev"

HKCU/Software/Microsoft/VisualStudio/9.0/Open Find/Places/UserDefinedPlaces/Place1/Path = "C:\Staging"

Important Notes:

  • It appears you must restart visual studio each time you edit these keys
  • VS2005 = 8.0 / VS2008 = 9.0
  • Path is a String Value (REG_SZ) containing the path to be added to the places bar
  • Desktop and My Computer seem to be predefined and always present?
  • I don't know whether you can have more than 5 places max like (the Common dialog)
  • Suggest creating a simple .REG file that can be edited and clicked to alter these



回答3:


If you just want to change the location of "my projects", you can set the path as described for VS in the answer to this post: http://social.msdn.microsoft.com/Forums/en-US/vssetup/thread/861733cd-e337-4fce-9570-1a1d43cd64ac/

I have just done this for VS2005 and VS2008 and it works fine.



来源:https://stackoverflow.com/questions/237748/customizing-the-places-bar-in-visual-studio-2008

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