diff --git a/src/libraries/System.IO.FileSystem/tests/Base/SymbolicLinks/BaseSymbolicLinks.cs b/src/libraries/System.IO.FileSystem/tests/Base/SymbolicLinks/BaseSymbolicLinks.cs index adaec2b9094f00..f08d4a0ce2dcc2 100644 --- a/src/libraries/System.IO.FileSystem/tests/Base/SymbolicLinks/BaseSymbolicLinks.cs +++ b/src/libraries/System.IO.FileSystem/tests/Base/SymbolicLinks/BaseSymbolicLinks.cs @@ -57,11 +57,18 @@ public static IEnumerable SymbolicLink_ResolveLinkTarget_PathToTarget_ { get { - foreach (string path in PathToTargetData.Union(PathToTargetUncData)) + foreach (string path in PathToTargetData) { yield return new object[] { path, false }; yield return new object[] { path, true }; } + // UNC paths are excluded from the returnFinalTarget=true case since + // they throw "The specified network name is no longer available" in + // various Windows versions. https://github.com/dotnet/runtime/issues/120380 + foreach (string path in PathToTargetUncData) + { + yield return new object[] { path, false }; + } } }