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:
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.
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.
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)
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).
Select * From INFORMATION_SCHEMA.TABLES
table_name LIKE '%log%'
table_name NOT LIKE '%catalog%'
Show table columns with a specified name:
Select*From INFORMATION_SCHEMA.COLUMNS Where column_name ='ColName'
sql – I want to show all tables that have specified column name – Stack Overflow.
Learn about design! Tip from co-worker.