Favorite .NET library not a 4.0?

Recently I made some configuration changes to Powershell so I could use the latest .Net version (4.0), but it caused errors with a project. The problem turned out to be that the library was trying to load an older version of mscorelib. This is pretty easily fixed thanks to Microsoft packaging a compiler with .NET.

#download your library source and extract if necessary
cd \path\to\source\code

#If your target is x64, use "Framework64" instead
C:\Windows\Microsoft.NET\Framework\v4.0.30319\v4.0.30319\MSBuild.exe .\project.csproj

 

Now you have a version of your library compiled as a .NET 4.0 DLL.¬†You could of course use Visual Studio to do this, but who would want to deal with it when you’re only a couple commands away?