The task scheduler below clearly errors but it never shows up under the task scheduler operational view as being failed but completed successfully. I want to send an email on a failed task scheduler to myself. I could do this on my old box not this Windows 2012 R2 Server box.
Application: Tournaments.NotificationProcessor.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.NullReferenceException Stack: at System.Data.Entity.Core.Common.Internal.Materialization.Coordinator1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].ReadNextElement(System.Data.Entity.Core.Common.Internal.Materialization.Shaper) at System.Data.Entity.Core.Common.Internal.Materialization.Shaper1+SimpleEnumerator[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext() at System.Linq.Enumerable.FirstOrDefault[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089] at Tournaments.Data.Repositories.Games.GamesRepository.GetGame(Int32, System.Nullable1) at Tournaments.NotificationProcessor.Program.Main(System.String[])