Skip to content

Commit f70ef5a

Browse files
committed
Update preprocessor directives for .NET 8 compatibility in KernelJsonSchemaBuilder, ProtocolEndpoint, and Logger
1 parent 21a5cec commit f70ef5a

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/Microsoft.SqlTools.Connectors.VSCode/InternalUtilities/src/Schema/KernelJsonSchemaBuilder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ internal static class KernelJsonSchemaBuilder
3232
TreatNullObliviousAsNonNullable = true,
3333
};
3434

35-
#if NET6_0_OR_GREATER
35+
#if NET8_0_OR_GREATER
3636
[RequiresUnreferencedCode("Uses reflection to generate JSON schema, making it incompatible with AOT scenarios.")]
3737
[RequiresDynamicCode("Uses reflection to generate JSON schema, making it incompatible with AOT scenarios.")]
3838
#endif
@@ -68,7 +68,7 @@ public static KernelJsonSchema Build(
6868
return KernelJsonSchema.Parse(jsonObj.ToJsonString(options));
6969
}
7070

71-
#if NET6_0_OR_GREATER
71+
#if NET8_0_OR_GREATER
7272
[RequiresUnreferencedCode("Uses JsonStringEnumConverter and DefaultJsonTypeInfoResolver classes, making it incompatible with AOT scenarios.")]
7373
[RequiresDynamicCode("Uses JsonStringEnumConverter and DefaultJsonTypeInfoResolver classes, making it incompatible with AOT scenarios.")]
7474
#endif

src/Microsoft.SqlTools.Hosting/Hosting/Protocol/ProtocolEndpoint.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public async Task Start()
121121
public async Task WaitForExitAsync()
122122
{
123123
this.endpointExitedTask = new TaskCompletionSource<bool>();
124-
#if !NET6_0_OR_GREATER
124+
#if !NET8_0_OR_GREATER
125125
await this.endpointExitedTask.Task;
126126
#else
127127
await this.endpointExitedTask.Task.WaitAsync(CancellationToken.None);

src/Microsoft.SqlTools.Hosting/Utility/Logger.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public static string GenerateLogFilePath(string logFilePrefix = defaultTraceSour
202202
int uniqueId;
203203
try
204204
{
205-
#if NET6_0_OR_GREATER
205+
#if NET8_0_OR_GREATER
206206
uniqueId = Environment.ProcessId;
207207
#else
208208
uniqueId = Process.GetCurrentProcess().Id;

0 commit comments

Comments
 (0)