Where is the snippet for a method's XML summary? - c#

I'm referring to the snippet that's used when typing /// before a method.
I've found something for JavaScript (C:\Program Files (x86)\Microsoft Visual Studio 14.0\JavaScript\Snippets\1033\XML Comments) but changing it didn't affect the C# XML summary.
I'm aware of this question but the accepted answer doesn't really answer this question, and the second answer is outdated.

As requested by OP, not sure if it's an answer - but there doesn't seem to be a better one at the moment, unfortunately...
This may be helpful, this is a User Voice for this and still unresolved as it seems.
As per the #HenkHolterman's comment - that I agree with - I don't think that's a snippet. For the moment it seems to be built into VS (out of curiosity I searched through VS 15 - new version not the 2015, and nothing new in there either - I searched all files for anything resembling XML comments).
There's a VB solution that, as I could see, places a custom .XML file in the specific AppData location - which doesn't work for C#. They describe the process as...
Visual Studio has built-in defaults for the XML skeletons that get
inserted, but when VBXMLDoc.xml is present upon startup, Visual Studio
will use the XML definitions from that file instead

As per a comment above - there's a User Voice request for it. And as per a comment on the User Voice - it can be done in VB but not C#.

Related

How to 'combine' histories of two files (one being the older 'version' of the other one)

I basically have what's a poor-man's versioning...
At one point someone copied / renamed the 'file.cs' to 'old-file.cs' - and all its history up to that point going with it.
And then created a new 'file.cs' - with all the new history going forward.
I ended up with the same file having history split up in between these two files.
I know this must be simple (if possible),
- I've tried searching, but my problem is how to 'phrase the question'
- This isn't a 'merge' (I think - I don't have branches involved),
- It's not the typical 'move' either
- I've looked up the tf command line but nothing resembles what I need
- I have the TFS Source Control Explorer Extension installed (but it can't really help with this)
FWIW, I'm using the VS 2015, C# project (both files are part of the same project), though I don't mind if the solution is command line 'tf' or whatever gets the job done.
So if anyone could help point me to the right direction at least it would be much appreciated. Thanks!
I have tested with TFS 2015.3 + VS 2015.3, but couldn't reproduce your scenario. In my test, the history in old file has been migrated to new file. You may check my steps to see whether they are the same as yours:
Rename a file gulpfile.js to old-gulpfile.js, and check it in in Source Control Explorer. Then copy old-gulpfile.js in workspace and modify it to gulpfile.js, and add it to source control and check it in.
Check old-gulpfile.js history:
Check gulpfile.js history:
You can see all history in old-gulpfile.js is also in new gulpfile.js file.

C# view source code of a particular .NET class

I browsed through some questions and this one stood out as the better one:
.Net Classes and their source code which pointed me to this place here: Microsoft Reference Source Server.
I tried everything the site says, downloaded a file that I cannot open from there and at some point ended up with a .pdb file in my source folder for the symbol cache that I could not open with a multitude of tools I looked into.
So this is my last resort to find an answer to my question. Out of pure curiosity (and lack of a better way to understand some stuff) I want to open a particular class from Microsoft (namely I wanna look into RichTextBox and maybe the classes it inherits from) but I simply cannot find a way to make this work for me. I want the original source, not a decompiler product because, well because I mainly need to understand some stuff, not see random variable names. I appreciate any help that may get me around my stupidity and clumsiness, as well as the right tools to do so (if any other than VS).
Note that I am using Visual Studio 2012 and yes, I went over a guide covering this specific version instead of the guide on VS 2008.
The "download" links on this page: http://referencesource.microsoft.com/netframework.aspx should work. However try downloading them via Internet Explorer; my Firefox attempted to download an .aspx file instead of the installer itself for some reason. (EDIT: as #ParagMeshram pointed out, just rename the netframework.aspx to netframework.msi as a quick fix if necessary)
In addition, here's a link to the source hosted by dotnetframework.org: http://www.dotnetframework.org/default.aspx/4#0/4#0/untmp/DEVDIV_TFS/Dev10/Releases/RTMRel/wpf/src/Framework/System/Windows/Controls/RichTextBox#cs/1305600/RichTextBox#cs
I can't say for certain if it's the latest greatest, or what you would be compiling against exactly, but should give you a good idea of how it works.

How to disable Visual C# activity from appearing in My Recent Documents?

I would like activity in my Visual C# 2008 Express to not appear in My Recent Documents (I use Windows XP). To clarify, when you open a solution or other file in Visual C#, a link to that solution or other file is added to "My Recent Documents". I would like that not to happen.
How can that be achieved?
I know there's a chance this question is better fit for one of SO's sister sites, but my best judgment was that it fits here...
Thanks
I know there is a away of stopping Windows from updating the list, but I don't believe there is a way to stop it from updating for certain file types.
I way you may be able to do it with is to use batch scripting.
cd "C:\Documents and Settings\PROFILE_NAME\Recent"
del *.<C# file extension or other project extensions>
...
del *.<C# file extension or other project extensions>
Create the file using Notepad and save it as <any name>.bat.
After you work with you C# project you just run this Batch script and it will remove all your evidence from your My Recent Documents folder.
NOTE: If you can't access the Recent folder (because it's hidden) try replacing Recent with My Recent Documents
Thanks
link textI've added this functionality to Visual Studio MRU editor.
The list of extensions is currently fixed, and it needs to be roughened out.
The new prelimenary executable can be downloaded here.
... and the Sources, in case you don't trust me ;)
(I'm not sure if I should keep the separate "save" handling - it was a good idea during testing, but otherwise is rather annoying).

Navigate files with VisualStudio 2008

I am currently developing with VisualStudio 2008. I find it increasingly difficult to find files when the number of files and projects increase. The situation become so bad that I literally have to spend 10-20 seconds to find code I want to work on when switch between files. Sounds like not a lot of time, but this can be very annoying because it breaks the "coding flow".
I believe this is a general problem with all IDEs. But I still find it easier to work with Eclipse. One particular example is that in Eclipse, I could apply some key shortcut to find implementations defined in an Interface.(I have forgotten which key shortcut though, after not working with it for about 1 year.) Another example is that in VS 2008, rightclick->Find all references will find all occurrences containing the selected text(Update: This accusation is incorrect. Thanks for pointing it out); while similar operation in Eclipse will find all occurrences where the selected class/variable are referenced. Personally, I find the Eclipse way is better for file navigation.
This could be due to my inexperience with VS IDE. So, I am looking for suggestions to improve the file navigation experience so that I can get some more time for actual coding.
I have used the navigate buttons but they are only useful for small number of files.
Thanks.
I agree wholeheartedly about ReSharper. If you don't want a "paid" solution though, a useful Visual Studio shortcut is
CTRL + ,
it gives a list of recently edited files.
CodeRush is a free alternative to ReSharper which you might find useful too.
Kindness,
Dan
Have a look at Jetbrains Resharper. Ctrl N or Ctrl Shift N. To jump quickly to files by type name or by file name. Also you can control Click Classes to navigate to them instantly.
I can't even work in visual studio without it anymore. It virtually eliminates the need for the solution explorer
SamTools for Visual Studio 2005/2008 (and I have a build for 2010 if someone needs it). The particular feature that's handy here is the Solution File List.
You can right click the tab of any open document and Find In Solution Explorer or Show In Windows Explorer
You can right click in the Solution File List for the same
Unlike other solutions to this problem, this is a properly docking tool pane so it fits in great. Ctrl+Alt+F places you in the Filter box with the current text selected, so it's very easy to work with.
Oh and it's free/GPL. :)
Solution File List http://wiki.pixelminegames.com/images/8/88/SamTools_SlnFileList.png
Dpack is also a free alternative with some nice file navigation shortcuts, but Resharper is the bomb.
BTW, they should have some more of this stuff in vs2010, which is in beta right now (I think)

Tool to automatically reformat whole C# source tree in VS2008?

I have inherited a large source tree, C#, Visual Studio 2008.
It has many quality issues, one of them is that the code is generally badly formatted.
I am looking for a tool, preferably a plugin for Visual Studio, that will go over the whole solution and apply the same basic formatting that Visual Studio itself applies when, for example, you close a curly brace around a block of code.
Any suggestions?
In vs2005, you can do Edit->Advanced->Format Document for a single file, which will (I believe) do what you're asking. I assume vs2008 has a similar function somewhere.
ok, so why not try a macro, if you want to do the entire solution, there is a vb example here
http://blogs.msdn.com/kevinpilchbisson/archive/2004/05/17/133371.aspx
it opens each file and applies the same formatting that VS does, but the macro will work across an entire solution (may not be that wise to run it if your solution is huge), beyond reflecting the internals of the format document code in VS and inling it into some sort of stream, this appears to be the easiest way to make use of what i consider to be a very useful feature in visual studio
ReSharper should do what you're looking for. Have a look at their Code Cleanup Feature. This can be applied to multiple files including the whole solution.
if you have already set your preferences in the vs editor options, you should be able to hit CTRL K, CTRL D which will tidy the code based upon your preferences
Here's the simple way (for me)...
I have my Visual Studio set to reformat on "Paste"
Tools | Options | Text Editor | C# | Formatting
**Automatically format on paste** (checked)
When I hit an ugly file, I do CTRL-A, CTRL-X, CTRL-V -- poof, instant format :)
Hope this helps.
Kevin

Categories

Resources