28 December 2011

Science vs Faith flowchart

A while back a friend sent me a link of this science vs faith diagram that's been going around for more than a while (e.g. here and here and here).
Couldn't help but detect a hint of malevolence in the depiction of faith, so here's my own more reasonable version in response:
Science vs faith flowchart diagram

20 December 2011

Treating most warnings as errors

A common scenario in C# I find is that I would like to:

  1. Treat most warnings as errors by default
  2. But, treat a few specific warnings as just warnings.

I still want them to show up as warnings, which is to say that I don't want them to disappear altogether. 'CS0618 Obsolete' is a good example of this.

This cannot be achieved through the C# Project Properties editor, but it can be done by manually editing the .csproj file to add these two MSBuild properties:

<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsNotAsErrors>618</WarningsNotAsErrors>

This is vaguely referred to in the docs here, and the list of error codes can be found here.

19 December 2011

VS Macro Problems

Setting up a new computer I somehow managed to break Visual Studio macros. Finally found this, which fixed it. (See the Workaround tab).


Basically delete this magical file, then rerun the VS installer:

%ProgramFiles(x86)%\Microsoft Visual Studio 9.0\Common7\IDE\1033\Microsoft.VSDesignerUI.dll