Visual Studio Tips
Update: second post here, third here, fourth here and fifth here.
Some random tips:
- If you need to run a web site under a different domain, so as to test multitenancy, for example, you need to run Visual Studio as an Administrator, otherwise you will get an error about an invalid hostname;
- If you want, you can configure Visual Studio to always start as Administrator: set the compatibility options to require additional permissions, see more here;
- You can have the Solution Explorer track (select automatically) the file you are editing; just select option Tools - Options - Track Active Item in Projects and Solutions;
- In case you need to find some class that you don't know where is located, or you only know a part of its name, use the Edit - Navigate To option or click <Ctrl>+<comma>;
- Split the editor window: select Window - Split; to close it, unselect it;
- You can now move a window to another monitor;
- Select columns across lines: click <Alt> while you make a vertical selection using the mouse or cursor keys; you can then copy the selection or paste some code into it;
- With <Alt>+<Up> or <Alt>+<Down>, you can switch the order of lines;
- Paste your JSON or XML code as classes: select Edit - Paste Special - Paste JSON as Classes/Paste XML as Classes;
- You can see the classes that inherit from some of your project's class: just select the file containing it in Solution Explorer, expand the selection to find the class, and then expand the class; you will find an option Derived Types.
And that's it for now. More will follow!