C# Visual Studio 2010 工具箱控件已禁用或处于非活动状态

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8871531/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-09 04:54:23  来源:igfitidea点击:

Visual Studio 2010 toolbox controls disabled or inactive

c#asp.netvisual-studio-2010

提问by Muhammad Ramzan

I am trying to fix this from last two 2 or 3 days but failed. VS 2010 toolbox in asp application development(design mode or source) is not showing all controls(showing html and reporting ones), i can see all by right click(show all) but they are greyed out or inactive. Have used devnev.exe in VS command line to reset , have reinstalled VS, have deleted the four hidden files in C:\Users\Ramzan\AppData\Local\Microsoft\VisualStudio\10.0with extension .tbd, all in vain.

我试图从最近两天或三天开始解决这个问题,但失败了。asp 应用程序开发(设计模式或源代码)中的 VS 2010 工具箱未显示所有控件(显示 html 和报告控件),我可以通过右键单击(显示全部)查看所有控件,但它们呈灰色或不活动状态。在VS命令行中使用devnev.exe重置,重装VS,删除C:\Users\Ramzan\AppData\Local\Microsoft\VisualStudio\10.0中的四个隐藏文件,扩展名为. tbd,一切都是徒劳的。

This thing driving me mad. I have another machine and everything works fine. please help me out, i really did everything possible

这件事让我发疯。我有另一台机器,一切正常。请帮帮我,我真的做了一切可能

回答by Eric Coulson

Don't know if this applies; but I had all controls in the toolbox disabled; you could see them but they were disabled - This in Visual Studio 2010. I right click on a toolbox item then reset toolbox and then they are enabled. Note that you may lose any custom controls you added.

不知道这是否适用;但我禁用了工具箱中的所有控件;你可以看到它们,但它们被禁用 - 这在 Visual Studio 2010 中。我右键单击一个工具箱项,然后重置工具箱,然后它们被启用。请注意,您可能会丢失添加的任何自定义控件。

回答by hagensoft

This was driving me crazy for a pair of days. In the choose items menu my 3rd party controls (CrystalReportsViewer) were checked. Reset toolbox did nothing to enable them. My solution was changing the target framework from .NET Framework 4 Client Profileto the full version .NET Framework 4, seems the client profile which is a subset of the version optimized for client applications does not support my controls or just using references to other 3rd party .dll librarys. This issue should only be for .NET 3.5 and 4.0, Client Profile is discontinued for .NET 4.5

这让我疯狂了几天。在选择项目菜单中,我的第 3 方控件 (CrystalReportsViewer) 被选中。重置工具箱没有启用它们。我的解决方案是将目标框架从.NET Framework 4 Client Profile更改为完整版.NET Framework 4,似乎客户端配置文件是为客户端应用程序优化的版本的子集不支持我的控件或仅使用对其他第三个的引用派对 .dll 库。此问题仅适用于 .NET 3.5 和 4.0,客户端配置文件已停止用于 .NET 4.5

回答by Harry

Right click in toolbox and remove check from "SHOW ALL" (if checked)

右键单击工具箱并从“显示全部”中删除检查(如果选中)

回答by babak

I had the same problem and fixed it now after 3 days:

我遇到了同样的问题并在 3 天后修复了它:

  1. reset toolbox (not worked)
  2. close and reopen the solution (not worked)
  3. close and reopen the VS (it worked!)
  1. 重置工具箱(不起作用)
  2. 关闭并重新打开解决方案(不起作用)
  3. 关闭并重新打开 VS(它起作用了!)

回答by Amir Sa

Probably your project is RUNNING. STOP the project then your toolbar items will become enable.

可能您的项目正在运行。停止项目,然后您的工具栏项目将变为启用。

回答by Bhramar

After a long time googling , and mostly all answers - revolving around

经过长时间的谷歌搜索,几乎所有的答案都围绕着

  1. Reset Toolbar
  2. Delete .tbd files from C:\Users(your user)\AppData\Local\Microsoft\VisualStudio\11.0
  3. Using devenv.exe /SafeMode & devenv.exe /ResetSettings.
  1. 重置工具栏
  2. 从 C:\Users(your user)\AppData\Local\Microsoft\VisualStudio\11.0 删除 .tbd 文件
  3. 使用 devenv.exe /SafeMode & devenv.exe /ResetSettings。

None of them working out for me, making me more sick.

他们都没有为我锻炼,让我更难受。

There is something I did which worked and thought it's worth sharing if it helps someone.

我做了一些工作并且认为如果对某人有帮助就值得分享。

I followed all of the above steps, failing . I did Step 1 & 2 with my project (in VS 2012) open and

我按照上述所有步骤操作,失败了。我打开了我的项目(在 VS 2012 中)并执行了第 1 步和第 2 步

  • Right Click on Toolbox > Choose Items > Pressed Reset > ok.
  • Then again, Right Click on Toolbox > Add Tab > 'gave it some name' > then again
  • Reset Toolbox
  • 右键单击工具箱 > 选择项目 > 按下重置 > 确定。
  • 然后再次右键单击工具箱> 添加选项卡> '给它一些名字' > 然后再次
  • 重置工具箱

There was some screen flash/flickering - some loading .

有一些屏幕闪烁/闪烁 - 一些加载。

And to my surprise the Grey life ( grey controls ) were now available .

令我惊讶的是,现在可以使用 Gray life(灰色控制)。

Hope this helps someone like me! :)

希望这可以帮助像我这样的人!:)

回答by ANewGuyInTown

If you are working in WPF applicationand your Xamlis opened withxml, then make sure you right clickand view designer, to get your toolbox controls enabled. (Toolbox controls seem to be active(enabled) only in designer mode). At least that was the case with me.

如果您正在工作WPF application并且您的Xamlxml打开的,那么请确保您right clickview designer, 以启用您的工具箱控件。(工具箱控件似乎仅在设计器模式下处于活动状态(启用))。至少我是这样。

回答by Nishantha

This worked for me..

这对我有用..

How to completely reset the Toolbox and enable Visual Studio to rebuild it from scratch

如何完全重置工具箱并启用 Visual Studio 从头开始​​重建它

  1. Close Visual Studio;

  2. Open the "c:\Users\\AppData\Local\Microsoft\VisualStudio\10.0" (Windows 7) folder and remove all the .TBD files;

  3. Run the "regedit" tool. For this click the "Run" item in the Start menu and type "regedit" without quotation marks;

  4. Find the "HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\ToolboxControlsInstaller_AssemblyFoldersExCache" and "HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\ToolboxControlsInstallerCache" keys;

  5. Remove everything from these keys leaving them empty;

  6. Run Visual Studio again and wait until it recreates all items in the Toolbox.

  1. 关闭 Visual Studio;

  2. 打开“c:\Users\\AppData\Local\Microsoft\VisualStudio\10.0”(Windows 7)文件夹并删除所有 .TBD 文件;

  3. 运行“regedit”工具。为此,请单击“开始”菜单中的“运行”项,然后键入不带引号的“regedit”;

  4. 找到“HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\ToolboxControlsInstaller_AssemblyFoldersExCache”和“HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\ToolboxControlsInstallerCache”键;

  5. 从这些键中删除所有内容,让它们空着;

  6. 再次运行 Visual Studio 并等待它重新创建工具箱中的所有项目。

回答by Farhad Hemmati

I know this is old but I just encountered the same problem and here is what I did:

我知道这是旧的,但我刚刚遇到了同样的问题,这是我所做的:

  1. Click on Data Flow
  2. Right click anywhere in that window
  3. Select SSIS Toolbox.
  1. 点击数据流
  2. 右键单击该窗口中的任意位置
  3. 选择 SSIS 工具箱。

Hope this would help someone.

希望这会帮助某人。

回答by merce_00

I worked for me doing the following steps:

我为我工作,执行以下步骤:

  1. Reset Toolbox (Right click in Toolbox->Reset Toolbox)
  2. Add a new tab with any name (Right click in Toolbox->Add Tab)
  3. Reset Toolbox (Right click in Toolbox->Reset Toolbox)
  1. 重置工具箱(右键单击工具箱-> 重置工具箱)
  2. 添加具有任何名称的新选项卡(在工具箱中右键单击-> 添加选项卡)
  3. 重置工具箱(右键单击工具箱-> 重置工具箱)