Solved

Which reference and using must be done to use ProvideToolboxControl?

Posted on 2015-01-29
6
352 Views
Last Modified: 2015-02-01
I'm writting a bunch of controls and i would like them to be added to the same control tab in the toolbox.

I've found out that i could write this just before my class definition, but the compiler keep telling me "are you missing a using or an assembly reference?":

[ProvideToolboxControl("MyComponentsTab", false)]

Open in new window


Anyone can help me to find it?  I've searched for a while but i can't find anything.

(I'm using Visual Studio 2010)

Thank you
0
Comment
Question by:cdebel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 21

Assisted Solution

by:masterpass
masterpass earned 100 total points
ID: 40578898
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 200 total points
ID: 40578948
That reference points to Visual Studio 2012, but 2010 has the Microsoft.VisualStudio.Shell.10.0.dll assembly.

You should find that file in the C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.VisualStudio.Shell.10.0 folder.
0
 
LVL 80

Assisted Solution

by:David Johnson, CD, MVP
David Johnson, CD, MVP earned 200 total points
ID: 40579110
First off you need the visual studio 2010 sdk?  Do you have this installed? Then follow this walkthrough until you get the steps down pat.
0
Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

 
LVL 10

Author Comment

by:cdebel
ID: 40579119
I've included the Microsoft.VisualStudio.Shell.10.0.dll, then added a "using Microsoft.VisualStudio.Shell", but it still doesn't change anything.  And i don't see where i can specify the name of the toolbox tab name in this sample.

Maybe i didn't explained well.  I've made a solution with 3 projects (ControlA, ControlB, TestForm).  When i compile, and go to TestForm project, i see in the tool box two tabs: ControlA Components, and ControlB Components, and there's only 1 control in each.  It seems to be done automatically, What i would like to have is "MyComponents" tab, and have ControlA and ControlB inside that tab.

I'm new to custom user controls.  

Thanks
0
 
LVL 10

Author Comment

by:cdebel
ID: 40579295
David, i've installed SDK after you told it to me, then followed the instruction in the walkthrough, but no mater what i put in the ProvideToolboxControl, it show the user control i've made under "ProjectName Components".  So if i've defined a control in a project, than another control in another project, they don't group together.

Now i've got an additionnal problem.  In this walkthrought, at the very end they say
When you build a Toolbox control, Visual Studio creates a file named ProjectName.vsix in the \bin\debug\ folder of your project. You can deploy the control by uploading the .vsix file to a network or to a Web site. When a user opens the .vsix file, the control is installed and added to the Visual Studio Toolbox on the user's computer
.  So i've tried that.  It installed and when i first opened Visual Studio, it was showing in the toolbox.  I've closed it, then when i reopened Visual Studio, it was not there anymore.  So i've tried to install again, but it says it's already installed.   When i go to Tools /  Extensions Manager, it's not there.  I've searched a bit over the web, and found that i could delete them by deleting their folders under:
%userprofile%\AppData\Local\Microsoft\VisualStudio\10.0\Extensions (but they were not listed here)

%userprofile%\AppData\Local\Microsoft\VisualStudio\10.0Exp\Extensions (they were there, but deleting them doesn't change anything.  If i try to reinstall them, it still say that it's already installed.

I'll do some more research tomorrow about this...
0
 
LVL 10

Author Comment

by:cdebel
ID: 40582612
I'm on a critical project and time is crucial.  For the moment i've grouped all the components i've done in a single project  as i want them to be shown in the Toolbox.  

I'll accept Bob comment as the answer since it's how i've defined my question.

Thanks a ton David for this contribution because i'm sure the answer to what i'm trying to accomplish is right there, but must have missed a detail.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Reactjs with .NET 3 72
JQuery Detecting page post back 6 19
How to get a Powershell script to launch from Visual Studio 20 64
Need help with a query 14 36
Great sound, comfort and fit, excellent build quality, versatility, compatibility. These are just some of the many reasons for choosing a headset from Sennheiser.
Or at least that’s the word according to a new blog from Tech Target on AWS’s new Managed Services (MS) offering. According to the blog, AWS is launching their AWS MS program to expedite the adoption of cloud by Fortune 1000 and Global 2000 companie…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question