简体   繁体   English

禁用 Visual Studio 2010 工具箱控件

[英]Visual Studio 2010 Toolbox controls disabled

VS 2010 Toolbox in ASP.NET 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 . ASP.NET 应用程序开发(设计模式或源代码)中的 VS 2010 Toolbox 未显示所有控件(显示 HTML 和报告控件),我可以通过右键单击(全部显示)查看所有控件,但它们是灰色或不活动的。

I 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.0 with extension .我在 VS 命令行中使用devnev.exe进行了重置,重新安装了 VS,删除了C:\Users\Ramzan\AppData\Local\Microsoft\VisualStudio\10.0中的四个隐藏文件,扩展名为 . tbd , all in vain.待定,一切都是徒劳的。

This thing is driving me mad.这件事快把我逼疯了。 I have another machine and everything works fine there.我有另一台机器,那里一切正常。
Any help much appreciated.非常感谢任何帮助。

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.您可以看到它们,但它们已被禁用 - 这在 Visual Studio 2010 中。我右键单击一个工具箱项,然后重置工具箱,然后它们被启用。 Note that you may lose any custom controls you added.请注意,您可能会丢失您添加的任何自定义控件。

Probably your project is RUNNING.可能您的项目正在运行。 STOP the project then your toolbar items will become enable.停止项目,然后您的工具栏项目将变为启用。

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

This was driving me crazy for a pair of days.这让我疯狂了几天。 In the choose items menu my 3rd party controls (CrystalReportsViewer) were checked.在选择项目菜单中,我的第 3 方控件 (CrystalReportsViewer) 被选中。 Reset toolbox did nothing to enable them.重置工具箱没有启用它们。 My solution was changing the target framework from .NET Framework 4 Client Profile to 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.我的解决方案是将目标框架从.NET Framework 4 Client Profile更改为完整版本.NET Framework 4 ,似乎客户端配置文件是针对客户端应用程序优化的版本的子集,不支持我的控件或仅使用对其他 3rd 的引用方 .dll 库。 This issue should only be for .NET 3.5 and 4.0, Client Profile is discontinued for .NET 4.5此问题仅适用于 .NET 3.5 和 4.0,.NET 4.5 已停用客户端配置文件

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!)关闭并重新打开 VS(它有效!)

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从 C:\Users(your user)\AppData\Local\Microsoft\VisualStudio\11.0 中删除 .tbd 文件
  3. Using devenv.exe /SafeMode & devenv.exe /ResetSettings.使用 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 .令我惊讶的是,Grey life(灰色控件)现在可用了。

Hope this helps someone like me!希望这可以帮助像我这样的人! :) :)

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;关闭 Visual Studio;

  2. Open the "c:\Users\\AppData\Local\Microsoft\VisualStudio\10.0" (Windows 7) folder and remove all the .TBD files;打开“c:\Users\\AppData\Local\Microsoft\VisualStudio\10.0”(Windows 7)文件夹并删除所有 .TBD 文件;

  3. Run the "regedit" tool.运行“regedit”工具。 For this click the "Run" item in the Start menu and type "regedit" without quotation marks;为此,单击“开始”菜单中的“运行”项,然后键入不带引号的“regedit”;

  4. Find the "HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\ToolboxControlsInstaller_AssemblyFoldersExCache" and "HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\ToolboxControlsInstallerCache" keys;找到“HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\ToolboxControlsInstaller_AssemblyFoldersExCache”和“HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\ToolboxControlsInstallerCache”键;

  5. Remove everything from these keys leaving them empty;从这些键中删除所有内容,使它们为空;

  6. Run Visual Studio again and wait until it recreates all items in the Toolbox.再次运行 Visual Studio 并等待它重新创建工具箱中的所有项目。

If you are working in WPF application and your Xaml is opened with xml , then make sure you right click and view designer , to get your toolbox controls enabled.如果您在WPF application中工作并且您的Xaml是使用xml打开的,那么请确保您right clickview designer器,以启用您的工具箱控件。 (Toolbox controls seem to be active(enabled) only in designer mode). (工具箱控件似乎仅在设计器模式下处于活动状态(启用))。 At least that was the case with me.至少我是这样。

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.选择 SSIS 工具箱。

Hope this would help someone.希望这会对某人有所帮助。

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)重置工具箱(在工具箱中单击鼠标右键->重置工具箱)

帮助我的是将项目类型从 Windows 应用程序更改为类库 - 然后(在重新构建并重新打开之后......)我启用了所有控件。

What did it for me on a custom control was to first remove the control from my base project.在自定义控件上为我做了什么是首先从我的基础项目中删除控件。 Then I had to pull up the custom control as a separate solution by itself and recompile it.然后我不得不将自定义控件作为一个单独的解决方案单独提取并重新编译它。 I had to make sure that that it was compiled as a class library and not as a windows application.我必须确保它被编译为类库而不是 Windows 应用程序。 I had to make sure that it was compiled with Framework 4 (same as my base solution) and that all sub controls and projects were also using framework 4. Once I got all of those things sorted out I went back to my base project and added the newly compiled control and sure enough it was enabled.我必须确保它是使用框架 4 编译的(与我的基本解决方案相同),并且所有子控件和项目也使用框架 4。一旦我整理好所有这些东西,我就回到了我的基本项目并添加了新编译的控件,果然启用了。

I hope this helps someone.我希望这可以帮助别人。

I tried all the above mentioned still not working for me.我尝试了上述所有方法仍然对我不起作用。 I was working on a windows application after that I have started the web application coding on visual studio after that whenever I was opening the Visual studio this problem was occurring.之后我正在开发一个 Windows 应用程序,之后我在 Visual Studio 上开始了 Web 应用程序编码,之后每当我打开 Visual Studio 时,就会出现这个问题。 I am using Visual studio 2015. So what I did, I have right-click inside the toolbox panel and selected 'choose option' then under '.Net framework' components tab I have checked all check boxes for which assembly name is 'System.windows.forms' It is working for me now.我正在使用 Visual Studio 2015。所以我做了什么,我在工具箱面板内右键单击并选择了“选择选项”,然后在“.Net 框架”组件选项卡下,我检查了程序集名称为“系统”的所有复选框。 windows.forms' 它现在对我有用。

Make sure the currently opened solution platform actually supports controls you need.确保当前打开的解决方案平台确实支持您需要的控件。 My problem was, for example, that I tried to add 'SqlConnection' control to .NET 6.0 application.例如,我的问题是我试图将“SqlConnection”控件添加到 .NET 6.0 应用程序。 Once, I created a '.NET Framework Windows Form' project 'SqlConnection' control became available有一次,我创建了一个“.NET Framework Windows Form”项目,“SqlConnection”控件变得可用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM