From a3a55cb5ac8323f5c0786b74c0b9de5287a8fcb1 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 22 Sep 2025 13:33:23 +0000
Subject: [PATCH 1/3] Initial plan
From a42b791b6b7f4c79465fd7e33300ef08ad4ef7d1 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 22 Sep 2025 13:49:12 +0000
Subject: [PATCH 2/3] Update .NET package dependencies to latest compatible
versions
Co-authored-by: BenjaminMichaelis <22186029+BenjaminMichaelis@users.noreply.github.com>
---
Directory.Packages.props | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Directory.Packages.props b/Directory.Packages.props
index dfd699f8..2f925768 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -8,14 +8,14 @@
-
-
-
+
+
+
-
-
+
+
From 5a730d98bbe09fbcaa4305570a482a1006cd7d0a Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 22 Sep 2025 16:52:42 +0000
Subject: [PATCH 3/3] Fix Chapter05 network tests to handle DNS blocking and
broader network exceptions
Co-authored-by: BenjaminMichaelis <22186029+BenjaminMichaelis@users.noreply.github.com>
---
...PassingCommandLineArgumentsToMain.Tests.cs | 36 +++++++++++++++++--
...ng05.33.CustomParameterValidation.Tests.cs | 18 +++++++++-
2 files changed, 51 insertions(+), 3 deletions(-)
diff --git a/src/Chapter05.Tests/Listing05.15.PassingCommandLineArgumentsToMain.Tests.cs b/src/Chapter05.Tests/Listing05.15.PassingCommandLineArgumentsToMain.Tests.cs
index 1e066e4f..b1224c9c 100644
--- a/src/Chapter05.Tests/Listing05.15.PassingCommandLineArgumentsToMain.Tests.cs
+++ b/src/Chapter05.Tests/Listing05.15.PassingCommandLineArgumentsToMain.Tests.cs
@@ -33,7 +33,23 @@ public void Main_IntelliTectIndexHtmlArgs_DownloadFile()
IntelliTect.TestTools.Console.ConsoleAssert.Expect(
expected, () => result = Program.Main(args));
}
- catch (AggregateException exception) when (exception.InnerException is System.Net.Http.HttpRequestException)
+ catch (AggregateException exception) when (
+ exception.InnerException is System.Net.Http.HttpRequestException ||
+ exception.InnerException is System.Net.Sockets.SocketException ||
+ exception.InnerException is TaskCanceledException ||
+ exception.InnerException is System.Net.NetworkInformation.NetworkInformationException)
+ {
+ Assert.Inconclusive("Unable to download the file. Check your internet connection.");
+ }
+ catch (System.Net.Http.HttpRequestException)
+ {
+ Assert.Inconclusive("Unable to download the file. Check your internet connection.");
+ }
+ catch (System.Net.Sockets.SocketException)
+ {
+ Assert.Inconclusive("Unable to download the file. Check your internet connection.");
+ }
+ catch (TaskCanceledException)
{
Assert.Inconclusive("Unable to download the file. Check your internet connection.");
}
@@ -48,7 +64,23 @@ public void Main_GoodArgs_DownloadFile()
{
Assert.AreEqual(0, Program.Main(args));
}
- catch (AggregateException exception) when (exception.InnerException is System.Net.Http.HttpRequestException)
+ catch (AggregateException exception) when (
+ exception.InnerException is System.Net.Http.HttpRequestException ||
+ exception.InnerException is System.Net.Sockets.SocketException ||
+ exception.InnerException is TaskCanceledException ||
+ exception.InnerException is System.Net.NetworkInformation.NetworkInformationException)
+ {
+ Assert.Inconclusive("Unable to download the file. Check your Internet connection.");
+ }
+ catch (System.Net.Http.HttpRequestException)
+ {
+ Assert.Inconclusive("Unable to download the file. Check your Internet connection.");
+ }
+ catch (System.Net.Sockets.SocketException)
+ {
+ Assert.Inconclusive("Unable to download the file. Check your Internet connection.");
+ }
+ catch (TaskCanceledException)
{
Assert.Inconclusive("Unable to download the file. Check your Internet connection.");
}
diff --git a/src/Chapter05.Tests/Listing05.33.CustomParameterValidation.Tests.cs b/src/Chapter05.Tests/Listing05.33.CustomParameterValidation.Tests.cs
index 20293144..881d33c1 100644
--- a/src/Chapter05.Tests/Listing05.33.CustomParameterValidation.Tests.cs
+++ b/src/Chapter05.Tests/Listing05.33.CustomParameterValidation.Tests.cs
@@ -175,7 +175,23 @@ public void Main_IntelliTectIndexHtmlArgs_DownloadFile()
IntelliTect.TestTools.Console.ConsoleAssert.Expect(
expected, () => result = Program.Main(args));
}
- catch (AggregateException exception) when (exception.InnerException is System.Net.Http.HttpRequestException)
+ catch (AggregateException exception) when (
+ exception.InnerException is System.Net.Http.HttpRequestException ||
+ exception.InnerException is System.Net.Sockets.SocketException ||
+ exception.InnerException is TaskCanceledException ||
+ exception.InnerException is System.Net.NetworkInformation.NetworkInformationException)
+ {
+ Assert.Inconclusive("Unable to download the file. Check your internet connection.");
+ }
+ catch (System.Net.Http.HttpRequestException)
+ {
+ Assert.Inconclusive("Unable to download the file. Check your internet connection.");
+ }
+ catch (System.Net.Sockets.SocketException)
+ {
+ Assert.Inconclusive("Unable to download the file. Check your internet connection.");
+ }
+ catch (TaskCanceledException)
{
Assert.Inconclusive("Unable to download the file. Check your internet connection.");
}