diff --git a/Directory.Packages.props b/Directory.Packages.props
index 01bc967e..f301a793 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -6,10 +6,10 @@
-
+
-
+
@@ -35,19 +35,19 @@
-
-
+
+
-
-
+
+
-
-
-
-
+
+
+
+
@@ -70,7 +70,7 @@
-
+
@@ -78,11 +78,11 @@
-
-
+
+
-
-
+
+
@@ -95,19 +95,19 @@
-
-
-
-
-
+
+
+
+
+
-
-
+
+
-
-
-
+
+
+
\ No newline at end of file
diff --git a/libraries/Intellisense/FileSystem/Shares/Win32ApiService.cs b/libraries/Intellisense/FileSystem/Shares/Win32ApiService.cs
index 16b4dd15..e18bd1c0 100644
--- a/libraries/Intellisense/FileSystem/Shares/Win32ApiService.cs
+++ b/libraries/Intellisense/FileSystem/Shares/Win32ApiService.cs
@@ -43,18 +43,28 @@ public void Dispose()
public class Win32ApiService(
ILogger logger,
CancellationTokenSource cts,
- IPathFactory pathFactory,
- ResourceManager resourceManager
-)
- : IShareService
-{
- private const int MaxItemCount = 1000;
- private static readonly TimeSpan PingTimeout = TimeSpan.FromSeconds(5);
- private static readonly TimeSpan ShareRetrievalWarningTime = TimeSpan.FromSeconds(3);
-
- public async Task> GetSharesAsync(string host)
+ IPathFactory pathFactory,
+ ResourceManager resourceManager
+ )
+ : IShareService
{
- if (!await PingHost(host))
+ private const int MaxItemCount = 1000;
+ private static readonly TimeSpan PingTimeout = TimeSpan.FromSeconds(5);
+ private static readonly TimeSpan ShareRetrievalWarningTime = TimeSpan.FromSeconds(3);
+
+ // Vanara's NetApi32 methods cause stack overflow on net 10
+ // TODO investigate
+ private static bool SkipShareOperationsBecauseNet10Broken => true;
+
+ public async Task> GetSharesAsync(string host)
+ {
+ if (SkipShareOperationsBecauseNet10Broken)
+ {
+ logger.LogDebug("Skipping share enumeration in GitHub Actions environment");
+ return [];
+ }
+
+ if (!await PingHost(host))
{
return [];
}
@@ -105,6 +115,12 @@ private async Task PingHost(string host)
public async Task> GetHostsAsync()
{
+ if (SkipShareOperationsBecauseNet10Broken)
+ {
+ logger.LogDebug("Skipping host enumeration in GitHub Actions environment");
+ return [];
+ }
+
await Task.CompletedTask;
logger.LogDebug("Fetching hosts");