Failure on Windows 2012 R2 only

I’ve encountered a very bizarre bug that I’ve narrowed down to a specific scenario but due to potential impact I need to try and find out why.

Application A v 1.0 built for .NET 4.7.2 runs fine on Windows Server 2012 R2
Application A v 2.0 also built for .NET 4.7.2 but now using a .Net Standard 2.0 shared library suddenly causes the tcp stack to fail (specifically all DNS resolution fails, even internal destinations)

This bug only occurs on 2012 R2. 2016 works just fine.
This bug occurs even if only the assembly for the shared library is included, no actual instances declared or references made, not even a using statement, just having the shared library in the dependencies causes this.

Outside of the application DNS resolution works fine.
FusionLogs are functionally identical between what gets loaded on my Windows 10 machine and what gets loaded on 2012 R2. Only difference being the encoded folder names for the native images loaded.

Here’s a list of all relevant dependencies from the shared library

BouncyCastle.Crypto v 1.8.5:
    Org.BouncyCastle.Crypto.Parameters;
    Org.BouncyCastle.OpenSsl;
    Org.BouncyCastle.Security;
Common.Logging v 3.4.1:
DnsClient v 1.2.0:
Microsoft.CSharp v 4.7.0:
Mimekit v 2.4.1:
NewtonSoft.Json v 12.0.1:
System v 4.0.0.0:
    System.Collections.Generic;
    System.Collections.Concurrent;
    System.IO;
    System.IO.Compression.FileSystem;
    System.Drawing;
    System.Numerics;
    System.Runtime.Serialization;
    System.Net;
    System.Net.Http;
    System.Net.Http.Headers;
    System.Security.Cryptography;
    System.Text;
    System.Threading;
    System.Threading.Tasks;
    System.Xml;

Exception:

17:16:21 [1] [Info] - DNS Query against 'google.com'

Unhandled Exception: System.Net.Sockets.SocketException: No such host is known
   at System.Net.Dns.GetAddrInfo(String name)
   at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6)
   at System.Net.Dns.GetHostEntry(String hostNameOrAddress)
   at DNSAPITestApp.Tester..ctor() in ...
   at DNSAPITestApp.Program.Main(String[] args) in ...

I’ve installed individually, tested, and then again all together, tested, to no avail the following .NET entities:

.NET Core 2.1 runtime
ASP.NET 2.1 runtime
.NET Core SDK
.NET Framework 4.7.2 SDK
.NET Framework 4.8 SDK
.NET Framework 4.7.2 Runtime
.NET Framework 4.8 Runtime

I’ve searched extensively online however there’s just too much white noise of similar DNS issues that still having nothing to do with this specific scenario or why this could be happening (and just as importantly how to confirm any theories).

Any help would be greatly appreciated. I can’t post much of the code but if there are any specific areas where a particular dependency is used that anyone would like to see I can add snippets.

.NET Foundation Website | Blog | Projects | Code of Conduct