Visual Studio 2019 "Solution Explorer" "View Code" icon C# - visual-studio

Does anyone else have this issue? There does not seem to be a way to edit the Solution Explorer toolbar. One of the icons for Solution Explorer is missing in my C# projects.
I am using Version 16.10.3.

I managed to add this icon to the wrong place, but maybe you can find the right place and update this answer.
I did this by customizing menus:
Clicking Tools | Customize...
Selecting Commands tab
Clicking Add Command...
Selecting View
Selecting View Code, and then OK
It looks like what you have to do is find the right place to add it in the first place.
The options under Commands are Menu bar, Toolbar, and Context menu, none of which seems to fit. I looked around briefly; maybe you can do a more in depth search to find the right spot.
I have several extensions installed. One of these modifies the Solution Explorer behavior for dynamic nodes. It's possible that extension or another is interfering with this icon. Try also disabling your extensions and see if that has an effect.

Folks, I figured out the issue. When you create a .NET Core 5.0 project the VS environment is setup different. I deleted the .NET 5.0 project and recreated as a .NET Standard one with the same name and the icon showed up again.
In fact, the Studio 'solution' version is different although your using the exact same VS application. Problem solved for now.

Related

How to reset the context menu in VisualStudio to have default items?

Am using VisualStudio 2013, update2. I am facing the below issue when I opened a project in VisualStudio today, I noticed on right clicking a project in the SolutionExplorer the context menu have a lot of options that even have scrolling now. Now I have to scroll down everytime to build or clean a project.
Earlier it was like a short menu like below.
I have not changed any settings but don't know why am facing this issue. I tried to customize the context menu command and chose (Project and solution context menus | Project) from the drop down, but that didn't worked out as it is automatically reset to tfs on clicking the close button. Does any one have idea about how to rectify this?
Note: The context menu has changed only for the projects inside the solution. On right clicking the solution name in solution explorer, I am still getting the same old menu.
From looking at your context menu screenshot, it looks like you have some extensions installed that have introduced these commands. Try disabling some or all of them in Tools > Extensions and Updates Manager to see which ones belong to which extension. There unfortunately isn't a way right now to customize this context menu.
Thanks,
Cathy
Visual Studio IDE Team

Source Control Menu is missing

I just installed Visual Studio Ultimate on a new computer. It works, but there's no source control menu, and I need that. It also doesn't check out files, not surprisingly, since I can't configure the connection to the server because the menu is missing.
How do I fix this?
Try to right click on project in the "Solution Explorer" and click "Go Online..."
Late to the show... Team Explorer suddenly disappeared for me. restarted VS to no avail.
I was able context menu on project item to right click one of the changed files and click 'Check In'.
The check in worked, the team explorer tab became visible and things are good. Notably, the TEAM main menu item is still missing.
My computer is a couple years old, really needs to be rebuilt. This seems to be one of those VS issues w just live with.
Hope the work around helps someone.
View -) other windows -)Source control explorer

Code Window does not highlight selected (usually .cs) file in "Solution Explorer"

My Visual Studio has done something really weird.
Usually, when you are in the "edit window" and are changing code, the file you are editing will highlight in "Solution Explorer".
Also, if all projects are "collapsed" in "Solution Explorer", and then there is a file already open (as in, you can see its "tab"), when you click the tab of that file (to be able to edit it), the Solution-Explorer will un-collaspse that project and highlight the file you are editing.
My "Solution-Explorer-Highlight-The-Current-File" function has stopped working.
I can move from tab to tab to tab, and Solution-Explorer doesn't react at all.
I've googled and binged, and I either get 5 billions hits ... or none. The key phrases are too ambiguous I think.
Anybody ever seen this one?
I have VS2010 on the same machine, and it works just fine.
I have one Add-In installed, but it is installed in both VS2010 and VS2012. Thus I don't think it's the culprit.
Smaller hammer.
From the menu: Tools -> Options
From the tree: Projects and Solutions -> General
On the form check: Track Active Item in Solution Explorer
Well.
From here:
How do I truly reset every setting in Visual Studio 2012?
I found this "Big Hammer" command line switch.
/ResetUserData
I used it.
And now it works.
I hate to answer something myself, but just in case somebody hits this in the future.

Macro to sync active item in Solution Navigator

I don't like the "Track Active Item in Solution Explorer" option in VS, since it seems to slow things down a lot, and can be a bit buggy.
Instead, I'm using the macro shown here (http://weblogs.asp.net/kdente/archive/2008/04/30/locating-the-active-item-in-solution-explorer.aspx) to manually sync the solution explorer using a shortcut key.
Now, I'm switching from using Solution Explorer to the new Solution Navigator that comes with the VS Productivity Pack, and I'm missing this functionality a lot.
Does anyone know if there's anything I can do to manually sync the Solution Navigator to the active item?
Do you need to do this, as the Solution Navigator has an "Open" tab that shows all open files?
Visual Studio 2012 has this built-in using the SolutionExplorer.SyncWithActiveDocument command (default key binding is Ctrl+[, Ctrl+S

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.

Resources