Live Writer is open source!

All blog posts in this blog have been posted using Live Writer, a great blogging tool we’ve had for years. However it stopped evolving in recent years and I almost lost hope… but! I’m now posting this from the brand new OpenLiveWriter which I just compiled and built myself! https://github.com/OpenLiveWriter/OpenLiveWriter Awesome!!!

0

An open-source full-fidelity XML parser

A while back I needed to understand XML at a low-level, including whitespace, line breaks and comments. While XLinq is a fantastic and powerful library, it does lack a few things, for instance I noticed it doesn’t preserve whitespace around attributes. Nor does it expose the position/line/column information about the nodes. So I took a…

1

Why is Environment.CurrentDirectory bad?

It is bad in general for various reasons, but it’s especially bad in build tools and related space (like CI servers and such). MSBuild could have had fine-grained parallelism where it could execute multiple tasks on different threads in parallel within the same process, significantly speeding up builds. However it can’t do that because many…

1

MSBuild: unnecessary rebuilds because of generated AssemblyAttributes.cs

A surprisingly common cause for unnecessary rebuilds of C# MSBuild projects is an unfortunate design in a part of MSBuild tooling that deals with generating AssemblyAttributes.cs. See for example this bug on Connect: https://connect.microsoft.com/VisualStudio/feedback/details/1269019/visualstudio-caches-wrong-path-for-netframework-version-v4-5-assemblyattributes-cs-file But let us step back. Let’s create a new C# Console Application in Visual Studio and build it with diagnostic verbosity….

2

How to have a Project Reference without referencing the actual binary

Sometimes you want a project reference from project B to project A to indicate a build-time dependency, but you don’t actually want assembly B to reference assembly A (maybe because it’s a runtime-only dependency or loaded using reflection). Having a project reference is beneficial because you indicate to the build system that in order to…

8

Using a common intermediate and output directory for your solution

By default each project in a VS solution has its output directory set to bin and its intermediate output directory to obj subdirectories of each project directory. If you’re using version control, you will find bin and obj directories scattered all over your tree, and although you can easily clean them all up with git…

4

MSBuildDumper

I published a tool to print out the evaluated values of properties and items in an MSBuild project: https://github.com/kirillosenkov/msbuildtools It is available on Chocolatey: cinst MSBuildDumper Usage: MSBuildDumper MyProject.csproj > props.txt I’ve blogged about this earlier: http://blogs.msdn.com/b/kirillosenkov/archive/2013/07/09/dump-msbuild-properties-and-items-for-a-project.aspx but now I decided to actually put it on GitHub and publish it on Chocolatey so that it…

0