-
Azure DevOps: ‘Removed’ Work Items Missing from ‘Assigned to me’ Query Results
I got a question from a customer yesterday as part of an upgrade to Azure DevOps 2020. He was telling me that some of the work items that were assigned to him were missing from the “Assigned to me” work item query results. He showed it to me and — sure enough — they were…
-
Streamline Git operations with .gitconfig aliases / What are my Git shortcut aliases?
If you didn’t already know, you can create shortcuts in Git by adding aliases to your .gitconfig file. I’ve created a bunch of them for operations that I either 1) do again and again or 2) can’t seem to remember the commands. Here are my .gitconfig aliases. (TL;DR? Here’s a link to all of them…
-
Azure DevOps Tips: Handling Strings in YAML Pipelines
Yesterday I wrote a post about an error I was getting in an Azure DevOps YAML Pipeline script. The gist was that I had a long string in the YAML file and I was running into a problem using the YAML string literal pipe ‘|’ syntax. Well, in my effort to understand what the specification…
-
YAML error in azure-pipelines.yml: “Bad indentation of a mapping entry”
Love it or hate it, you’ve got to admit that YAML build pipeline scripts can be a brittle. One little bit of whitespace out of place and — boom! — you staring at a ton of errors. I ran into two related errors yesterday while I was working on an Azure DevOps pipeline script: “bad…
-
3 Common Problems with ClaimsIdentity and ClaimsPrincipal in ASP.NET Core
In .NET Core, the ClaimsIdentity class represents a user in your application. It helps describe who they are and helps manage the list of claims which describe what they can do. But if you use the wrong constructor on ClaimsIdentity or provide the subtly wrong information to that constructor, you might see some strange behavior. …
-
Profile a Unit Test in Visual Studio Fails with “File contains no data buffers”
Visual Studio has a fantastic feature in it that lets you quickly run the performance profiler against a unit test. Got a test that is running slow and you want to find out why? Go to Test Explorer, right-click that test and choose Profile. That’ll automatically run that test with the profiler attached. It usually…
-
A Handy Script for .NET Developer Containers on Docker
I’m a .NET Core developer and I mostly work on a Mac. Before docker and containers, this would have been hard to do. But now there are containers for SQL Server, the Azure Storage emulator, and the CosmosDb emulator. Developing on a Mac is easy now. And developing on a Mac makes it easy to…
-
Azure DevOps YAML Pipelines: How to Set an Environment Variable during a Build or Release
I got a question from a user of my EF Core Migrations deploy utilities last week. He was running into problems where “dotnet ef database update” was picking up the wrong version of his appsettings.json config file. At first, it looked like it was a problem with my utility’s code but after some more digging,…
-
ASP.NET Core Integration Tests with Selenium & WebApplicationFactory
WebApplicationFactory<T> is one of those awesome features in ASP.NET Core that practically nobody knows about. WebApplicationFactory<T> lets you quickly and easily run integration tests against your ASP.NET Core MVC or Web API application without having to deploy the app to an actual server like Kestrel or IIS. Instead of running in a “real” server, your…
-
Tip: How to Skip a Continuous Integration Build for an Azure DevOps Git Commit
It doesn’t happen a lot but sometimes you’ve got a git commit that you know that there’s no reason to build. For example, you’re committing a change to a Git repo and that change only has some minor documentation change. Basically, it’s something that would never effect a build or a release so there’s no…