Registry keys to configure Watson and automatically save full dumps locally

You might have noticed that after installing Visual Studio the behavior of crashing programs changes – instead of the standard crash dialog you get the Visual Studio Just-In-Time Debugger: AeDebug The behavior of handling crashing programs can be controlled in the registry: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug] "Debugger"="\"C:\\windows\\system32\\vsjitdebugger.exe\" -p %ld -e %ld" "Auto"="1"…

1

Circular assembly references in the .NET framework

It was a surprise to me when I discovered that a lot of assemblies in the .NET BCL reference each other in a circular manner: Cycles in the reference graph are in red. Apparently there is special MSBuild magic used when compiling these assemblies. My guess would be that proper factoring of the assemblies into…

3

Dump MSBuild properties and items for a project

Sometimes when you’re reading a .csproj file you encounter properties like $(TargetDir) and wonder what directory does this property evaluate to when the project is compiled. Of course you can use heavy machinery like the MSBuild debugger, but sometimes a simpler tool can suffice. Here’s what I wrote in literally 5 minutes: using System; using…

2

Naming Roslyn concepts

We have a rather central component in Roslyn and we’re looking how to name it best. I’d like to gather some advice and opinions that could potentially help us find a good name. I am intentionally not mentioning what is it called right now. Instead, I’m going to describe it. If you recognize this component…

28

Collection initializers and Add method with more than one parameter

I didn’t know this about C# until today. This code compiles: using System; using System.Collections.Generic; class List : List<Tuple<string, int, bool>> { public void Add(string s, int i, bool b) { Add(Tuple.Create(s, i, b)); } static void Main(string[] args) { var list = new List { { "zero", 0, true }, { "one", 1, false…

7