yaakov.online

yaakov.online


I fight with computers

.NET

The Changing World of .NET

The following blog post is adapted from an internal presentation I gave at work a couple weeks ago. Overview In the last few years, Microsoft has shifted it's platform strategy drastically. Instead of being all about Windows, Microsoft has started to embrace the rest of the world. For example: Microsoft SQL Server vNext (2017 or 2018) run…

Stack traces from async methods in .NET

Microsoft's .NET stack has one of the two best implementations of asynchronous code through coroutines that I've seen, and the only one actually available for me to use. (The other is some weird stuff Valve have internally within Steam.) .NET's task-based asynchronous APIs follow a similar idea behind promises, except they have added synt…

Debugging CoreFX on macOS

A few weeks ago I was trying to set up a small iOS application when I came across an error in .NET Core when attempting to connect to the new HTTP/2-based Apple Push Notification System gateway. It appears that the issue is two-fold: The version of curl and libcurl that Apple ship with macOS does not support HTTP/2. (rdar://problem/29891…

Using HTTP/2 in .NET client applications

For some weird reason I don't understand, HTTP is a key part of Windows. It's integrated into Windows so much that in order to get WebSockets server support, you had to upgrade your PC to Windows 8 or Windows Server 2012. Similarly, to get HTTP/2 server support, you have to upgrade your machine to Windows 10 or Windows Server 2016. Window…

Waiting for a Process with Timeout in .NET

Along the same lines of my last post, we might want to be smarter about launching a process and waiting for it to exit. Particularly if that process is part of a critical system such as your build process, you don't want a hung process to be able to cause your entire build system to stop dead in it's tracks. Fortunately, Process has an ov…

Redirecting process output in .NET

In .NET, you can use the System.Diagnostics.Process APIs to start a process and get it's output. It seems fairly simple, but there's a few interesting caveats beneath those APIs. In this post I'll be looking at the simple case of starting a process, waiting for it to finish, and reading the contents of stdout. To set the stage, here's the…