Another annoying error this evening:
“Cannot define a class or member that utilizes 'dynamic' because the compiler required type 'System.Runtime.CompilerServices.DynamicAttribute' cannot be found. Are you missing a reference to System.Core.dll?”
This happened when trying to use the dynamic keyword from Visual Studio when the target framework was pointed to 3.5. Just change the target framework to 4.0 and everything will work as expected.
Now – the more important question: why did this happen?
Well – I had created a project for doing some development against Windows Azure; and Windows Azure only accepts projects targeting the .NET framework version 3.5 (so the project wizards created a project with such a dependency).