Visual Studio tips and tricks.
This article contains tips and tricks about Visual Studio. Tips are collected during day to day work with Visual Studio.
Searching with regular expression
Type Ctrl-F, in Find Options select Regular expression instead of “Wild card”
Type your regular expression; for example [.]isual studi[.]
The default behavior is greedy matching; to use non-greedy matching use the @ (instead of *) or
the # (instead of .)
Show command window Ctrl-Alt-A
Cycle through clipboard buffer Ctrl-Shift-V
Toggle display whitespace Ctrl-R, Ctrl-W
Show options for smart-tag Ctrl-.
Various tips and tricks
To start a shell from visual studio open the command window (Crl-W,A). Type “Tools.Shell cmd”.
To secure your website you can use SSL and certificates. In this post I will explain in detail how to setup your site to use a certificate, including the details of installing your own Certification Authority. Finally I will show you some C# code to work with certificates.
Part 1 will show you how to install the Certificate Authority on a Windows 2003 machine, part 2 is about creating a new website,
part 3 shows how to request a webserver certificate,
part 4 shows you how to send the request to the Certification Authority,
part 5 shows you how the CA processes the request,
part 6 shows you how to download and install the certificate on the website,
part 7 shows you how to create a virtual folder.
Part 8 shows you how to test ths site together with some coding examples in C#.
After build events can be added to the property page of a visual studio project. You can also add your own “targets” file to the afterbuild (or beforebuild) in the project file itself. Use the following method:
- Add a targets file to your project with the following contents (for example)
<?xml version="1.0" encoding="utf-8" ?>
<Exec Command="cd $(ProjectDir)" Outputs="null" />
<Message Text="Executing WSP Builder in directory $(ProjectDir)"/>
<Exec Command="$(WSPBuilderPath) "/>
- Unload the project file
- Right click the project file and choose Edit…..
- Add an import tag below the last import tag in the projectfile:
<Import Project="wspbuilder.Targets" />
- Uncomment the AfterBuild tag and add the following statements; remember to specify the adjust CallTarget!
<CallTarget Targets="BuildSharePointPackage" />
Win+Break Open “System Properties”
Shft+Win+M Restore all windows
Shft+Ctrl+Esc Task Manager
Visual Studio 2005
Server Explorer Ctrl+Alt+S
Solution Explorer Ctrl+Alt+L
Properties Window F4
Class View Ctrl+Shft+C
Error List Ctrl+W,Ctrl+E
Bookmark previous Ctrl+K,Ctrl+P
Output Window Ctrl+Alt+O
Insert Code Snippet Ctrl+K,Ctrl+X
Code Snippet manager Ctrl+K,Ctrl+B