Is there a 'scratch pad' window in Visual Studio - visual-studio

I currently use notepad to store little notes to myself about my code.
This is usually a mixture of code and requirements.
Is there a 'scratch pad' type window in VS where i could do this.
The other alternative is to use code comment blocks in the source files, but that's not quite what I'm looking for.

Try the sticky notes add in
http://www.davidhayden.com/blog/dave/archive/2008/03/18/VisualStudio2008AddInStickyNotes.aspx
http://code.msdn.microsoft.com/StickyNotes

On "Solution Level" you can add files (text, html or code) to act as notes files.
Also in projects, you can add files, and set the Build Action to None.

Most of the time I'd simply add a .txt file to the solution or abuse comments to do it. However, if you use the scratch pad to store todo lists et cetera you can use TODO: in your comments and visual studio will add them to the built in todo list.

I just found that visual studio has support for git style .md or markdown:
This provides good way of storing notes, requirements and developer instructions such as a readme.
To use: Just add a file to your solution with a .md extension.

I think Stick notes wont support VS 2005. Anyway WinDBG rocks.

Related

Is it possible to rename all variables in Visual Studio 2022

I decompiled the dll that my app creates for publishing it and found out, that everything is easy to read. The app is not rocket science but I'd like to hide some things, e. g. there are constants that are called productionHourlyRate what no one should know.
I know, there are obfuscation softwares but they are expensive.
An easy way would be to rename all variables and methods before publication, e. g. productionHourlyRate -> v1. Is there a built in possibility to do (and undo) this in Visual Studio 2022. Of course, I could rename them one by one but this is not very comfortable.
Or: Is there a free obfuscator that makes dlls undecompilable? No matter which tool I read about, I always find comments like "I decompiled the obfuscated dll with xyz and received the whole source code.".
Many thanks, Philipp
Edit: It is a C#/.Net app (Blazor WebAssembly)
Since there was no answer to this question, there is probably no Visual Studio built in solution.
So, I created an Excel tool that renames alle class, method and variable names in the specified files. Please find it here.
Important:
Make sure, you run this obuscator only when using a version control tool. You CANNOT undo the obfuscation with this Excel tool.
Usage
Add file paths in worksheet "files".
Run macro "Obfuscate" to obfuscate class, method and variable names with "v1", "v2"…
Publish your app.
Undo the changes with your version control tool.
Once all files are manually listed, the obfuscation should only take a few seconds.

Print Resharper Live Templates

In there any way to print a list of all my templates in Resharper.
Recently, I installed the mnemonics plugin which have added a lot of templates and I'm lost in all these shortcuts.
It would be nice to have a pretty print list with every template shortcut, the description and a sample of the code. This will surely help me using more template then now.
Thanks.
Not exactly something you can print out, but I have a little project that can round trip Live Templates between .dotSettings and .md files. It can also generate a nice README.md that lists all of the templates, gives the description, and provides a link to the .md version of the template file.
You can see the mnemonics templates here: README.md
My answer concerns Mnemonics extention. There is no official print-friendly keymap yet. Fortunately, large set of mnemonics is based on few common principles (so I just printed main page to remember it). Of course, you can investigate each mnemonic in ReSharper Templates Explorer.

Overriding the three slashes automatic documentation

Is there a way to automatically fill in the XML documentation created by Visual Studio when you type ///?
I want to auto fill the documentation like the variable name separated based on camel casing.
I could write a Visual Studio Add-In and bind it to different key combination, but wanted to see if there is any other way to do so.
GhostDoc might be able to help - it's excellent for generating XML comments.
You can use either GhostDoc or Resharper with the stylecop plugin.

How to store reusable code in Visual Studio 2010?

Is there any way I could save my block of code in Visual Studio 2010 and reuse it in my future web applications without having to "Add existing files"? Is there a feature in VS2010 that lets you globally store these blocks of code?
Thanks!
Oded pretty much covered it but I'll just reiterate here. There are three main ways you can do this depending on how much code you want to store.
For a little code just copy the code to your Toolbox:
Link
For a little code to very large blocks of code (with some intelligence for putting in values) you can use code snippets:
http://blogs.msdn.com/b/zainnab/archive/tags/tips+and+tricks/snippet/
And for lots of custom files, resources, etc... that essentially make up a new project you should use project templates:
Link
Visual Studio has a feature called code snippets, which will allow you to do exactly that.
If you want a more advanced use - for whole files, sets of files and even whole projects, use templates.

Tool to view the contents of the Solution User Options file (.suo)

Are there any free tools available to view the contents of the solution user options file (the .suo file that accompanies solution files)?
I know it's basically formatted as a file system within the file, but I'd like to be able to view the contents so that I can figure out which aspects of my solution and customizations are causing it grow very large over time.
A bit late for the original poster, but maybe useful to others.
Two freeware viewers for structured storage files (including .suo-files):
https://github.com/ironfede/openmcdf (old URL: http://sourceforge.net/projects/openmcdf/)
http://www.mitec.cz/ssv.html (free for non-commercial use)
When you open a .suo file in one of these viewers, you will see streams related to:
Bookmarks
Debugger watches
Unloaded projects
Outlining
Task-list user tasks
Debugger exceptions
Debugger Breakpoints
Debugger find source data
Open document windows
And much more...
The .SUO file is effectively disposable. If it's getting too large, just delete it. Visual Studio will create a fresh one.
If you do want to go poking around in it, it looks like an OLE Compound Document File. You should be able to use the StgOpenStorage function to get hold of an IStorage pointer.
I'm not aware of a tool, but you could write a Visual Studio extension to list the contents without too much work.
If you download the Visual Studio SDK, it has some straightforward examples that you can use. Find one that looks appropriate (like maybe the Toolwindow, if you want to give yourself a graphical display) and lift it (for your own personal use, of course).
What makes it easy is that the Package class which you implement in any VS extension, already implements the IVSPersistSolutionOpts, as aku mentioned. So you can just call the ReadUserOptions method on your package and inspect the contents.
I don't know any tool, but you can try to access user settings via IVsPersistSolutionOpts interface
You can use the built in tool that comes with OpenMCDF, which is called Structured Storage Explorer. It doesn't allow you to see all the details, but allows you to see all the individual settings and their sizes. In order to see the actual settings, you need to format the bytes as UTF-16.
Reference:
https://github.com/ParticularLabs/SetStartupProjects
I created an open source dotnet global tool for this:
dotnet install --global suo
suo view <path-to-suo-file>
More information at https://github.com/drewnoakes/suo

Resources