While converting a project that used SlimDX, and therefore has unmanaged code, to .NET 4.0 I ran into the following error: