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