Tips for Visual Studio 2013 — Visual Studio Magazine

Peek Definition (Alt+F12) provides you the benefits of Go To Definition without actually taking you anywhere. It opens the code file and displays the referenced definition directly beneath the line on which you’re focused, pushing your code lines down so it doesn’t cover them up. And if you drill down again, you get a second page in the Peek Definition window containing that referenced definition.

In Visual Studio 2013, you can now drag and drop code using the arrow keys. The trick is to hold down the Alt key.

To move lines with the keyboard:
Move your cursor anywhere within the line. You don’t have to select the entire line.

Hold the Alt key and press the up or down arrow keys until the line is where you want it.

To move multiple lines with the keyboard:
Select any portion of a set of lines. (Shift+Arrow Up/ArrowDown)

Hold the Alt key and press the up or down arrow keys until the lines are where you want them.

via 6 Top Tips for Visual Studio 2013 — Visual Studio Magazine.

Picking Up Queue Messages: Strategy and Tactics — Visual Studio Magazine

Picking Up Queue Messages: Strategy and Tactics

If you’re using MSMQ to offload work from your Web site, you have a number of ways to pick up those messages, including processing those messages as soon as they turn up.

By Peter Vogel02/26/2014

MSMQ provides a way of offloading work from your application to be processed at a later date or on another computer. In an earlier column, I showed how to write messages to a Microsoft Message Queue (MSMQ) for later processing. In this column, I’ll show the code for reading your messages from the queue and, more important, give you some options on where to put that code.

via Picking Up Queue Messages: Strategy and Tactics — Visual Studio Magazine.

Error “Exception has been thrown by the target of an invocation” when trying to connect to TFS / show team explorer in vs 2013

Problems with error “Exception has been thrown by the target of an invocation” when trying to connect to TFS / show team explorer window in Visual Studio 2013?

Solved by downloading and reinstalling Team Explorer 2013:
Download Team Explorer for Microsoft Visual Studio 2013 from Official Microsoft Download Center.

You can find more info on errors in Visual Studio 2013 in this logfile:
%userprofile%\AppData\Roaming\Microsoft\VisualStudio\12.0\ActivityLog.xml

 

 

C#: Interface-Based Programming — Visual Studio Magazine

C#: Interface-Based Programming

Interfaces can make your applications easier to test and maintain.

Interfaces help define a contract, or agreement, between your application and other objects. This agreement indicates what sort of methods, properties and events are exposed by an object. But interfaces can be utilized for much more. Here, we’ll look at how interfaces can help make your applications and components easier to test.

http://visualstudiomagazine.com/Articles/2010/01/01/Interface-Based-Programming.aspx?m=1&Page=1

Rename Visual Studio Window Title extension

Rename Visual Studio Window Title extension

This lightweight extension will change the window title of Visual Studio to include a folder tree with a configurable min depth and max depth distance from the solution/project file, or using special tags.

http://visualstudiogallery.msdn.microsoft.com/f3f23845-5b1e-4811-882f-60b7181fa6d6

 

Restoring SQL Server Database simple summary steps

I always tend to forget the order of this. A short summary for restoring a Sql server  .bak file:

1. Restore database. (Run Sql Server Manager as admin, make sure you window user have access rights to appropiate folders etc).

2. Delete the accompanied database user that is on the “database”. (user should be on database server scope not on the database)

3. If there isn’t already a user on the database server user level, create one, and set the user mapping for user -> database owner of -> newly restored db.