Skip to content

Commit 2c8c672

Browse files
author
ladeak
committed
Adding SupportedOSPlatform,enhanced error message for Linux support of VSExtension
1 parent 147865a commit 2c8c672

5 files changed

Lines changed: 8 additions & 2 deletions

File tree

src/CHttpExtension/CHttpExtension.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public static void SetMsQuicPath(string msquicPath)
2727
}
2828

2929
[SupportedOSPlatform("windows")]
30+
[SupportedOSPlatform("linux")]
3031
public static async Task<string> SendRequestAsync(
3132
bool enableRedirects,
3233
bool enableCertificateValidation,
@@ -93,6 +94,7 @@ string body
9394
}
9495

9596
[SupportedOSPlatform("windows")]
97+
[SupportedOSPlatform("linux")]
9698
public static async Task<string> PerfMeasureAsync(
9799
string executionName,
98100
bool enableRedirects,
@@ -184,12 +186,16 @@ public static async Task<string> GetDiffAsync(string file1, string file2)
184186

185187

186188
[SupportedOSPlatform("windows")]
189+
[SupportedOSPlatform("linux")]
187190
private static Version ParseHttpVersion(string version)
188191
{
189192
var parsedVersion = VersionParser.Map(version);
190193
#pragma warning disable CA2252 // This API requires opting into preview features
191194
if (parsedVersion == HttpVersion.Version30 && !QuicConnection.IsSupported)
192-
throw new InvalidOperationException($"QUIC is not supported or not available in folder {AppContext.BaseDirectory}");
195+
if (Environment.OSVersion.Platform == PlatformID.Unix)
196+
throw new InvalidOperationException($"QUIC is not supported or not available. Install libmsquic.so from your package registry.");
197+
else
198+
throw new InvalidOperationException($"QUIC is not supported or not available in folder {AppContext.BaseDirectory}.");
193199
#pragma warning restore CA2252 // This API requires opting into preview features
194200
return parsedVersion;
195201
}

src/VSCodeExt/dist/extension.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 Bytes
Binary file not shown.
8.03 KB
Binary file not shown.
6.66 KB
Binary file not shown.

0 commit comments

Comments
 (0)