Why do my toolbox items disappear in Visual Studio 2008?

后端 未结 9 1838
灰色年华
灰色年华 2021-01-12 08:44

I\'m working on a solution that contains multiple projects targeting Windows Mobile 5 and standard Windows applications.

Lately when opening up a form in designer th

相关标签:
9条回答
  • 2021-01-12 08:47

    I just had a similiar problem. In a managed C++ project all the default toolbox items disappeared form the winforms designer. After playing around for a while I found that there was a problem in the .vcproj file.

    <VisualStudioProject
        ProjectType="Visual C++"
        Version="9,00"
        Name="COLLADA Import"
        ProjectGUID="{0DEEF9B6-1929-44E3-92EC-13712839FB63}"
        RootNamespace="COLLADAImport"
        Keyword="ManagedCProj"
        TargetFrameworkVersion="0"
        >
    

    When you set TargetFrameworkVersion to a valid number, for example 131072 for .Net 2.0, the toolbox items will be back.

    0 讨论(0)
  • 2021-01-12 08:47

    I've noticed this exact same thing for regular WinForms as well. I can't speak to mobile applications but in regular winforms this has a tendency to happen.

    I believe it's actually a bug in Visual Studio.

    There are some things you can do (again, for WinForms. I'm not sure about mobile) with adding attributes to your control. Such as:

    [ToolboxBitmap(typeof(MyControl), "MyControlBitmap")]
    

    There are some other useful related things on this site:

    http://en.csharp-online.net/Design-Time_Integration-Attributes

    0 讨论(0)
  • 2021-01-12 08:47

    If you are running Visual Studio 2008 under vista, try running it as an Administrator. Right click on the shortcut and select Run as Administrator.

    0 讨论(0)
  • 2021-01-12 08:52

    I had exactly the same problem (after installing Windows Mobile SDK all items in the toolbox were greyed out).

    I've startet the Visual Studio 2008 command line as administrator and started the following command (WARNING - all your settings are lost !!)

    devenv /setup /resetuserdata /selfreg /resetskippkgs
    

    After that the toolbox looked fine and worked like on the first day. The idea came from this thread: connect.microsoft.com

    0 讨论(0)
  • 2021-01-12 08:52

    Go to the Tools menu and choose import & export settings, then choose the 'reset all' setting, then yes. Save your current settings, after that you'll have your toolbox reappear.

    0 讨论(0)
  • 2021-01-12 08:55

    Well guess what install Service pack 1 for VS 2008 and it would go away and if you have wireless mouse and keyboard turn it off. Choose one of these two both work.

    0 讨论(0)
提交回复
热议问题