Skip to content

Commit 23d61ec

Browse files
committed
use the overload of String.Contains() which accepts StringComparison
1 parent 0bf58c2 commit 23d61ec

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ SPDX-License-Identifier: MIT
1919
<ItemGroup>
2020
<PackageReference
2121
Include="Smdn.MSBuild.DefineConstants.NETSdkApi"
22-
Version="[1.3.6]"
22+
Version="[1.3.13]"
2323
PrivateAssets="all"
2424
IncludeAssets="build"
2525
/>

src/Smdn.Reflection.ReverseGenerating.ListApi/Smdn.Reflection.ReverseGenerating.ListApi.Build/ProjectBuilder.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,14 @@ public static IEnumerable<FileInfo> Build(
7171
var proj = new Project(
7272
projectFile: projectFile.FullName,
7373
globalProperties: globalProps,
74-
toolsVersion: RuntimeInformation.FrameworkDescription.Contains(".NET Framework")
75-
? "4.0"
76-
: "Current"
74+
toolsVersion:
75+
#if SYSTEM_STRING_CONTAINS_STRING_STRINGCOMPARISON
76+
RuntimeInformation.FrameworkDescription.Contains(".NET Framework", StringComparison.OrdinalIgnoreCase)
77+
#else
78+
RuntimeInformation.FrameworkDescription.Contains(".NET Framework")
79+
#endif
80+
? "4.0"
81+
: "Current"
7782
);
7883

7984
var buildRequest = new BuildRequestData(

0 commit comments

Comments
 (0)