7. November 2013 13:12
This is the second time in a few weeks where I have had a wtf? moment caused by not setting the Target Framework for a new project to the correct version.
Today it was missing an EmailAddress data annotation from the System.ComponentModel.DataAnnotations reference. I know the EmailAddress annotation should be part of that library, and my reference showed the correct library version (4.0.30319), but the EmailAddress just sat there with that red squiggly line mocking me.
Until I remembered to update my Target Framework from .NET Framework 4.0 to .Net Framework 4.5.