You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何移除Visual Studio失效菜单?解决VS2017右键COM错误菜单问题

Fixing the Broken "Locate in Solution Explorer" Menu in Visual Studio 2017

Hey there, let's get rid of that annoying dead menu item throwing COM errors in VS2017. I've worked through similar stale command issues before, so here are three reliable methods to clean it up—start with the safest first:

This is the least risky way since it uses Visual Studio's native tools:

  • Open Visual Studio 2017, head to the top menu bar and click Tools → Customize
  • In the pop-up window, switch to the Commands tab
  • Select Context menu from the dropdown at the top, then find Editor Context Menus | Code Window in the list below (this maps to your EditorContextMenus.CodeWindow target)
  • Scan the right-side command list for the broken Locate in Solution Explorer entry
  • Select it, click the Remove button, then hit Close to save changes
  • Restart Visual Studio, and that dead menu should be gone for good

Method 2: Reset Visual Studio Settings (If Customization Fails)

If the first method doesn't work, resetting settings can wipe out stale command references—just make sure to back up your custom settings first:

  • Go to Tools → Import and Export Settings
  • Choose Export selected environment settings, pick the settings you want to keep, and save them to a file for backup
  • Open the same Import and Export Settings wizard again, select Reset all settings, and follow the prompts to reset to default
  • Restart VS, and the broken menu should disappear. You can then re-import your backed-up settings if needed.

Method 3: Edit the Registry (Advanced Users Only)

Only try this if the above methods don't work—always back up your registry before making changes:

  • Press Win + R, type regedit, and hit Enter to open the Registry Editor
  • Navigate to this path: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\15.0\ContextMenuCommands (note: 15.0 is the version code for VS2017)
  • Look for a key associated with EditorContextMenus.CodeWindow.LocateinSolutionExplorer
  • Right-click the key and select Delete, then close the Registry Editor
  • Restart Visual Studio, and the problematic menu should be removed

Quick Notes

  • Always restart VS after making any changes to ensure they take effect
  • If you're unsure about registry edits, stick to the first two methods—they're far safer for most users

内容的提问来源于stack exchange,提问作者PAS

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 04:26:03