Categories
Visual Studio

TFS or VSTS Task Board has Missing Cards

TL;DR: This is caused by adding a parent/child relationship between two cards. We are using the new Kanban boards in Visual Studio Team Services (formerly known as Visual Studio Online, but this would also apply to on-prem TFS too). A month ago, another team member noticed a card had disappeared from the board. It seemed […]

Categories
Automation Programming Visual Studio

Restore Private NuGet Feed Packages During Visual Studio Team Services Build

Update! As of February 2016, you should be able to use the standard “NuGet Installer” vNext build task. The New Way Add the Nuget Installer build task, which can be found under “Add build step” -> “Package”. You will need to supply a NuGet.config file with the address of your custom feed: <?xml version=”1.0″ encoding=”utf-8″?> […]

Categories
Visual Studio

Stop Visual Studio Prompting For NuGet Feed Credentials

With the imminent arrival of Visual Studio Online Package Manager, which lets us host NuGet (and other) packages on our Visual Studio Online account, it is almost certain that you are going to lose the plot when managing NuGet packages in Visual Studio and keep getting prompted for your account details (especially as the “Remember […]

Categories
Automation Programming Visual Studio

Using Visual Studio Online PowerShell Build Step To Publish NuGet Package

Update! As of February 2016, you can now use the ready-made vNext NuGet Publisher step to do this and it is even easier. The New Way Add a new vNext build step using “Add build step…” -> Package -> NuGet Publisher. Select “Internal NuGet Feed” and paste in your feed url – job done. With […]

Categories
Visual Studio

Change the Date Format in Visual Studio Team Services

Visual Studio Team Services is rather good, but if you are using it outside of the USA you’ll be fighting the date format, which displays in the month-day-year format. The recommended fix for this used to be to set your preferences to pick up the date format from the browser, but for some reason this […]

Categories
Automation Programming Visual Studio

Using an In Memory Database as a Test Double with Entity Framework

If you are using Entity Framework and you want to test your application without the real database, the typical technique employed is to write a repository or query provider that you can substitute with a stub during the test. Sometimes, though, you are better off pushing things a couple of levels deeper. This is where […]

Categories
Visual Studio

How To Fix Broken Intellisense in Visual Studio Razor Views

I had an annoying issue in Visual Studio 2015 whereby the views lost all intellisense. Errors such as “The name model does not exist” and lack of assitance with HTML Helper methods were accompanied by red squiggly lines. Most of the advice for fixing this is based on the assumption that the views are broken […]

Categories
Visual Studio

Setting the Default Start-Up Project in Visual Studio

If your Visual Studio solution keeps forgetting your start-up project, or you want to set a sensible default for your whole team, there is a clever trick you can use to remove dependence on your .suo file. In case you didn’t know, when you select “Set as Start-Up Project”, your selection is jammed into a […]

Categories
Visual Studio

Visual Studio Selection Tricks

I find myself in the midst of one of those rote programming jobs that feels very tedious. Despite this, I am harnessing the opportunity of busy hands, idle mind to find a few handy tricks to speed things up. CTRL + Click selects “whole words” in Visual Studio. You can drag with this short-cut to […]

Categories
Visual Studio

Tabs vs Spaces in Visual Studio Code

This isn’t actually another source of ignition for the endless flame war. Whichever side of the eternal flaming pit of tabs vs spaces you find yourself, Visual Studio Code will live by your decision. By default, it runs on “auto” mode, which means your code is like a box of chocolates… but you can fix […]