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.

How to: View and Edit Code by Using Peek Definition (Alt+F12)

How to: View and Edit Code by Using Peek Definition (Alt+F12)

Visual Studio 2013

You can use the Peek Definition command to view and edit code without switching away from the code that you’re writing. Peek Definition and Go To Definition show the same information, but Peek Definition shows it in a pop-up window, and Go To Definition shows the code in a separate code window. Go To Definition causes your context (that is, the active code window, current line, and cursor position) to switch to the definition code window. By using Peek Definition, you can view and edit the definition and move around inside the definition file while keeping your place in the original code file.

via How to: View and Edit Code by Using Peek Definition (Alt+F12).

Show all tables where table name contains ‘log’

Show table columns with a specified name:

sql – I want to show all tables that have specified column name – Stack Overflow.