How to find all occurrences of specific DLL in whole solution in Visual Studio 2010 - visual-studio-2010

I was wondering if there is possible to find all occurrences of a particular assembly referenced to in many projects in a large projects solution.
Visual Studio should natively support that feature.

Solution to do that is click right button on require assembly in solution explorer and choose option "Project Hierarchy" and eventually click refresh button in appeared dialog window...
Natively supported by VS. I like it :) !

Related

Unable to browse to include reference in a Visual Studio C++ DLL project - any way to get around this?

I'm creating a DLL using C++ in Visual Studio 2015. I started my project by following these instructions.
I need to add a reference to my project so I can make use of an API and, unlike C# DLL projects (for example), I'm unable to access the Browse tab when clicking on Project > Add Reference.
According to this page this is because:
The number of tabs available at the top of the Add Reference dialog
box can vary, depending on the type of project open and the resources
it is using. C++ native projects contain only a Projects tab.
Why is there this restriction and is there any way to get around it?
EDIT: I've just found a solution here but I'm new to Visual Studio and I'm not sure how to set 'the CLR option' and then remove after adding my reference. If anyone can explain how to do this I would be very grateful!
I'm a little late to the party, but I recently encountered a similar problem and have a fix that might help the OP or others in the future.
Problem Overview:
Open the Visual C++ project[1] in Visual Studio[2]. In the top toolbar, click on "Project > Add Reference..." . In the window that pops up, there is no "Browse" button/option (see image No Browse option).
Solution:
In the top toolbar, click on "Project > Properties"[3]. In the left navigation panel of the window that pops up, click on "Configuration Properties > General" (this will probably be selected by default). In the right panel, click on "Project Defaults > Common Language Runtime Support". The field value should read "No Common Language Runtime Support" (see image No /clr). Using the drop-down menu in the Common Language Runtime Support field (the grey down-arrow box), select "Command Language Runtime Support (/clr)". Apply the change. The Property Page should now look like this. Click "OK" to close the Property Page. Now, when you go to add a reference, the window that shows up will have a "Browse..." button and look like this. If you want to subsequently remove CLR support[4], select the "No Common Language Runtime Support" option and apply the changes.
Notes:
[1] As you're probably aware, you can select from various project types when creating a new project in VS. I experimented with most of the Visual C++ project types included under the Visual C++ template. Since the problem -- lack of "Browse" option when adding references -- seems to be related to CLR support, you will encounter this problem in all Visual C++ project types that are not created as Visual C++ CLR projects. Thus, if you want avoid the problem from the get-go, consider creating a CLR project from the start.
[2] I was able to replicate the problem in Visual Studio 2015, 2017, and 2019; the same solution works for all versions.
[3] Before changing any Configuration Properties, use the Configuration drop-down list in the top-left of the Property Page to select which configuration you would like to change the properties for, e.g. Debug, Release, All.
[4] If you have added references after turning on CLR support, then turning off CLR support is dubious as suggested by #Cody Gray in the comments to the original question. I have not tried to build a project after doing something like this so I can't speak to the solution suggested here. My answer is just to tell you how to change the CLR support.
For C++ projects, you need to get all the projects into the same solution and then when you go to Add Reference you'll see the other projects listed. You then just check the box to 'add the reference'. Keep in mind that this will cause the import library of the DLL (or a static library for a non-DLL library project) to link against your target project. It will not add any include paths you might need to get to the import headers for your DLL.
DirectX Tool Kit has instructions for adding project-to-project references for a C++ project that you might find useful to read over. See here.
For some general background on C++ project-to-project references. See this Visual C++ Team blog post which was published when they were updated for Visual C++ 2010.

Searching in Visual Studio 2010 Solution Explorer is difficult when

Is there any addin or feature available to locate a project, or a file in solution explorer directly without using Ctrl+F (find) ?
We are having 1000's of project , each having N number of files inside.
Difficult to navigate using Find option.
Solution Navigator from Productivity Power Tools adds a new tool window with soultion search.

Custom file sorting in VS2010 Solution Explorer

Is there any way to force Solution Explorer in Visual Studio 2010 to sort files alphabetically but in order *.h, *.inl and *.cpp?
I want to have
Dummy.h
Dummy.inl
Dummy.cpp
Emmy.h
Emmy.cpp
Grammy.h
Grammy.cpp
instead of
Dummy.cpp
Dummy.h
Dummy.inl
Emmy.cpp
Emmy.h
Grammy.cpp
Grammy.h
No, there is no such feature built in.
I don't know of any extension or add-in that supports this, either, but I imagine that you could create one. Get started with the Visual Studio SDK, or browse the Visual Studio Gallery for something that serves a similar purpose.
However, the Solution Explorer does support grouping related files (such as headers, resources, and code files) into virtual folders. Turn that feature on by deselecting the second button to the left at the top of the Solution Explorer window labeled "Show All Files".

Visual Studio do not add my component (from a DLL) to the toolbox even if I reference it

As stated in the title, I copied my DLL in Visual Studio project, set it to "content" and "copy always". Added a reference to this DLL and set it to "copy locally".
I successfully managed to instance my component to a form through code but it doesn't appear in the toolbox, really boring.
How can I solve this issue?
If I link directly the DLL project to this project it works, but now I'm treating the DLL as "external" so it's not part of the same solution of the DLL project.
I had this problem with #AndrewFinnell's solution:
There are no components in 'c:....\XXXX.dll' that can be placed on the toolbox.
So I solved with drag and drop:
open Windows explorer and navigate to the DLL
drag the DLL and drop it on Visual Studio in the Toolbox, exactly where you want your components to appear.
I also realized that some components may have compatibility issues with certain .NET Framework versions. For instance A Professional Calendar/Agenda View That You Will Use seems not to work with .NET 4.5, while it does with .NET 4.
Right-click in the toolbox.
Click "Choose Items..."
Click "Browse..."
Navigate to your DLL and click Open
Then click "Ok"
Your components should then show up
The way I found to make this working is:
Add the dll, reference it
Compile the project
Save the solution and restart visual studio
And then controls show up in toolbox (not always working, I think is a sort of visual studio bug)
Like said above,
I reference the DLL in the client project by: in Solution Explorer right click > Add Reference, at this time the custom control doesn't appear in the Toolbox.
I save it and close the client project.
I restart Visual Studio 2012 and reopen the client project. Now the custom control is in the Toolbox.
I reopen the custom control project, make some modifications and compile.
And the most important, all changes that I made in the DLL project automatically were updated in the client project without need to redo "Add Reference".
Here is what I did.
After install the net 3.5 chart download from MSDN link, I manually copied the 3.5 chart dlls to my project and refer to them. Then, from the "choose item" of toolbox, browse to the dlls and add them into toolbox. Make sure the checkbox is checked for the "chart" in the "choose item" popup.
After these, the "chart" item in the toolbox should be available and enabled for .NET 3.5 project.
NOTE
(I am using Visual Studio 2010. I think my solution should work for 2012.)
I was having this same issue. I am working in Visual Studio 2010.
My user control library is written in C# and my project I'am importing it into is in Visual Basic.
If I had the C# project in my solution, the custom user controls would show up automatically. But if I only referenced the DLL it would not load the custom user controls from the referenced library into the "Toolbox".
The above post that mentions finding the file in explorer and dragging and dropping it into the toolbox solved the problem. This is a very strange way of behaving. VB user control libraries don't require this step.
This has been an issue I have had sitting on the burner for the last 2 years.
I would up-vote the previous answer but I don't have enough rep yet.
This post could use some better tags, cause it was buried on most of my google searches.
So
Reference the user control library
Drop the DLL file into the tool box.
One question I have in regards to this is: what happens if you change the project reference to the DLL (because it moved) and not attempt to update the toolbox reference (by removing the control from the toolbox and dragging and dropping the DLL from the new location)?
I tried following the other answers (thanks to all of you!), but I got this problem and I'll let you all know how I solved it and show my custom tools in toolbar (in VS 2017).
Place the .ddl file in any Library Solution
Then I add that .ddl as reference to my needed project
Build the project and restart the Visual Studio
Then, when I look into toolbox, my custom toolbox name appears in
toolbar, when I expand that I got below message
There are no Usable controls in this group. Drag an item onto this
text to add in to toolbok
I dragged the .dll and dropped under that text and then all my custom tools appeared in my toolbox.
And add lib. to folder in your solution example solutionfolder/bin/debug and then add reference to object from this folder, finally rebuild, quit, come back, drag and drop dll from this solutionfolder/.../../ and it will probably appear.

How to jump to a file in the Source Control Explorer in Visual Studio

I love the Solution Explorer > Right-click > "Open Containing Folder" feature of the PowerCommands extension for Visual Studio 2010. I want the equivalent of a "Jump to location in Source Control Explorer" feature. How can I find out the location in TFS of a given open file, or a file in the solution explorer (or a file in the solution navigator in you have the Productivity Power Tools extension)?
The best answer would be a couple of mouse clicks and no keyboard. Next best answer would be a hotkey mapping.
The only solution that I have found so far is to use the Productivity Power Tools extension which has the feature "Find in Source Control". A file in the results list can be right-clicked to "Open folder in Source Control Explorer". The drawbacks to this solution is that is takes many clicks, and the search results can match more than one file if files exist with the same name in different folders.
There is a stand-alone extension that you can download, called Locate in TFS, within Visual Studio.
"Locate in TFS" on TFS Gallery
"Locate in TFS" on GitHub
This also works on files that you "Exclude from source control", as many developers do with the web.config files.
psulek's post, above, mentions this as part of VSCommands, but I prefer the stand-alone extension.
Try Visual Studio extension VSCommands for Visual Studio 2012. It has feature called Locate in TFS. This will add new button to Solution Explorer Locate in TFS which opens active selected file/folder in TFS Source Control Explorer.
Feature request has been raised with Visual Studio team. Read here
I know it's probably too late. See TfsExt extension for vs2010
I'm not sure if it's possible, but it's a good suggestion.
These two examples show how to use the Visual Studio Extensibility APIs to access the TFS Source Control Explorer APIs.
http://blogs.msdn.com/b/edhintz/archive/2006/02/03/524312.aspx
http://blogs.msdn.com/b/bharry/archive/2008/07/09/working-on-tfs-sdk-improvements.aspx
For Visual Studio 2013 try lightweight extension TfsExt13

Resources