blob: 4b0bef79b17133532dedd44a9af351f202254b24 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
From 271d13eccbb73ff510ac52888ccb27419ef0af60 Mon Sep 17 00:00:00 2001
From: James Le Cuirot <jlecuirot@microsoft.com>
Date: Wed, 11 Mar 2026 12:02:27 +0000
Subject: [PATCH] linuxsettings: Fix CS0121 string.Split call ambiguity with
.NET 8.0
The error in full:
error CS0121: The call is ambiguous between the following methods or properties: 'string.Split(char[]?, StringSplitOptions)' and 'string.Split(string?, StringSplitOptions)' [src/shared/Core/Core.csproj::TargetFramework=net8.0]
Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
--- a/src/shared/Core/Interop/Linux/LinuxConfigParser.cs
+++ b/src/shared/Core/Interop/Linux/LinuxConfigParser.cs
@@ -31,7 +31,7 @@ public class LinuxConfigParser
{
var result = new Dictionary<string, string>(GitConfigurationKeyComparer.Instance);
- IEnumerable<string> lines = content.Split(['\n'], StringSplitOptions.RemoveEmptyEntries);
+ IEnumerable<string> lines = content.Split(new char[] { '\n' }, StringSplitOptions.RemoveEmptyEntries);
foreach (string line in lines)
{
--
2.53.0
|