i dont like the new interface of my search all, it suddenly change when i reinstall my visual studio
here is my search all result interface
the result suppose like this
Do you guys know how to change the result interface ?
It sounds like you are using 2 different types of search.
The first capture you provide is from Find and replace feature, that cand be raised with shortcut Ctlr + F, and when you select option "Find all". It returns a lsit fo files that match the text you are searching for. You may check Microsoft documentacion for Find and replace
The second capture represent the usage of Find references in your code, that provides a way to find where particular code elements are referenced throughout your codebase. You can find more information in Microsoft documentacion for Find references.
If you want to make use of Find references feature, you should use shortcut Shift + F12 or simply you can make right click over any object/class/element in your code, and select option Find all references.
Capture: Find all references using right click and contextual menu
Remember that this would not work with a simple piece of text, you must find references of an existant element, like a model, a class, a variable, etc.
Hope this info could be useful.
[EDIT]
Maybe I could misunderstand your question. If you refer to the theme (backgroud anf font color mainly) of the interface, you could set Light theme option, through main menu, selecting Tools menu, and then Options. once there, enter section General, under Environment option, and select Light option in dropdownlist associated with Color theme option.
Check this link (made for VS CE 2017, but work as well) to see captures of the process:
https://ourcodeworld.com/articles/read/869/how-to-change-to-a-dark-theme-in-visual-studio-community-2017
[EDIT FOR COMMENT]
I've checked it with VS 2019. As you said, default view for Find all feature looks like references result view. If you want to keep the "classic" list view, you can simply click on ListView button, at the right top, on the bar that appears over your result section, as you can see in following capture.
Related
In Visual Studio 2015, if you have code like this:
var foo = that.Bar(); // Get the value
//foo++;
selecting Edit -> Advanced -> Format Document results in formatting like this:
var foo = that.Bar(); // Get the value
//foo++;
where Visual Studio has assumed two unrelated comments were related and grouped them together. The assumption of relation is because there are consecutive lines, one ending with a comment and the next starting with one. This can, of course, be worked around by adding blank lines but that is not always the best choice depending on the specific code. Note that Visual Studio 2013 did not have this feature.
I was unable to find any mention of this feature via internet searches. This is C#, and Visual Studio is configured to preserve tabs.
Is there any way to disable this one portion of the auto-formatting?
I don't think this is possible. I've found this post on GitHub where one comment mentioned your problem. CyrusNajmabadi wrote:
Interestingly enough, we added some support to align comments over multiple lines. So, for example, in the example being mentioned, post format you end up with:
Alignment is an interesting problem, and currently we have no support for alignment to happen with tabs when formatting between tokens. However, it gets more and more complex considering you might have these comments attached to items which themselves get moved around by formatting and thus may have their locations move to places that are not on tabstop boundaries.
I am doing some clean up/ restructuring on my code (C#) were I move my classes in the tree structure. I am looking for a way to update all namespaces to the default ones (like projectname.rootFolder.ChildFolder).
I know that there are some ways to do it one by one like in this old post but I am looking for a clean simple update way. I wish there was something like "right clicking on the folder and clicking on update namespace!" but there is not.
Anyone knows any add-on/ easy way to do it?
Resharper is a tool to work on legacy code. Try to use this tool.
Right click on the folder> go to refactor and then select adjust Namespaces
I have been wondering how to setup intellisense comments for Visual Studio (minimum version 2013) and have been having trouble. Using XML comments are only useful for generating the separate file for documentation.
What I want is to be able to put descriptions on functions/methods that show up when I hover over them in a project I am working that includes the DLL that should have these descriptions already set. This is something trivial to be honest but it would be really nice to have this functionality. But every thing I try seems to end with no comments being shown in the project when I hover over these functions/methods.
To restate my question, what needs to be done to allow for my descriptions of functions/methods to appear when I hover over them when they are used in a separate project/solution?
Okay. I got it to work. I just checked the XML documentation file box in Project Properties -> Build Tab. I also needed to include it as Alexei Levenkov helped me out with in the comments. Doing both of those things allow them to show up.
I apologize if this has already been answered. I've looked and looked, and I can't find anything like what I want, which I find greatly surprising. Please feel free to give me a "This has already been asked" with a link... :(
I'm in the early stages of creating a program in C#. The main window will have a list of files which are relevant to my application. I currently have them in a list view, although I can switch widget types if necessary. What I'd like is to make it possible for a user to right-click on one or more of the file names which would bring up the same context menu as one would get in Explorer. With e.g. "Open", "Edit", "Print", and etcetera.
Obviously I could put stuff in a context menu manually, but I'd like it to have the same choices as one would have in Explorer. There will be Word documents and text files and various other odds and ends. I don't know how the list of actions in the standard Windows context menu is populated, especially considering that the list changes depending on the file type selected and whether more than one file is selected.
I can provide code if necessary, although I don't have anything interesting yet.
So my questions are - How do I get the list of actions one gets when right-clicking a file or group of files in Explorer? Is there a Windows API that I can call? Or do I aggregate choices that I read in the registry? And if so, what do I read? Or what?
As a bonus, I'd like to be able to add a few commands of my own to the menu only within my own application. Mostly all I can find is how to write an extension to the context menu such that I can add an action that appears always when clicking a specific file type. That is NOT what I want. This is a bonus though, and I can always add buttons or a drop down menu or something if this won't work or if it requires heroic coding.
I've found this article which describes the process for c++ but I think you will be able to transition it. Using the shell context menu
EDIT:
Here is another link to a project with ready to use code (C#):
Explorer shell context menu
It seems like all I use bookmarks for is to keep track of classes and methods. The problem is the line numbers become incorrect with editing. In addition, I have to manually set each bookmark. Is there a way to get a list of classes/methods within a file and click to go directly to it? Perhaps a plugin? Ideally I'd like a graphical representation that I could click on. Surely there is a plugin out there for that?
Try C# Resharper http://www.jetbrains.com/resharper/ - it cost some license, but really worth it.
C# Resharper http://www.jetbrains.com/resharper/ -is best.
People are suggesting Resharper already, but if you're using Visual Studio 2010 you could use a built in feature called Naviagate To
Just press:
Ctrl + ,
You can search for files/classes/objects/methods in your solution.
More information about Navigate To on this page: http://blogs.msdn.com/b/vseditor/archive/2009/09/22/searching-and-navigating-code-in-visual-studio-2010.aspx