Leo Reading

Software Engineer and Problem Solver From the USA

AppContext Displaying posts tagged with AppContext

I haven't posted an entry here in a while as I have a lot on my plate! I started a new job and am truly enjoying it. I work with a lot of very intelligent people, and am learning each and every day at a level that I haven't seen since I first started programming. This new job, however, comes with a code base that isn't always spectacular. This isn't unlike most positions you would find as a Software Engineer, but today a naming decision came to bite us in the butt, and nobody saw it coming.
TLDR;
.Net Version 4.6 added the System.AppContext class. If your .NET project is targeting 4.5 or lower and has its own class named AppContext with the namespace imported in a using directive, your project will build but will fail at run time on any machine with .NET 4.6 or later installed due to an ambiguous reference.
I decided to assist a c...