Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<SdkSrcRoot>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src'))</SdkSrcRoot>
<PackageProjectUrl>https://github.com/dotnet/sdk</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<LangVersion>Latest</LangVersion>
<LangVersion>Preview</LangVersion>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<DebugSymbols>true</DebugSymbols>
<!-- Default to all packages generating a corresponding symbol package -->
Expand Down
11 changes: 11 additions & 0 deletions src/Common/Polyfills.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace System.Linq
{
public static class CustomEnumerableExtensions
{
#if NET10_0_OR_GREATER
public static IEnumerable<T> Reverse<T>(T[] array) => Enumerable.Reverse(array);
#else
public static IEnumerable<T> Reverse<T>(this T[] array) => Enumerable.Reverse(array);
Copy link
Member Author

@jjonescz jjonescz Apr 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: This is needed to work around a C# breaking change on non-net10.0 TFMs.

(This would be needed anyway when C# 14 becomes the Latest version.)

#endif
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<Compile Include="..\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\**\*.cs" LinkBase="Microsoft.NET.Sdk.WorkloadManifestReader" />
<Compile Include="..\Resolvers\Microsoft.DotNet.MSBuildSdkResolver\FXVersion.cs" LinkBase="Microsoft.DotNet.SdkResolver" />
<Compile Include="$(RepoRoot)src\Common\EnvironmentVariableNames.cs" LinkBase="Common" />
<Compile Include="$(RepoRoot)src\Common\Polyfills.cs" LinkBase="Common" />
<Compile Include="$(RepoRoot)src\Common\WorkloadFileBasedInstall.cs" LinkBase="Common" />
<Compile Include="$(RepoRoot)src\Common\WorkloadSetVersion.cs" LinkBase="Common" />
<Compile Include="$(RepoRoot)src\Cli\dotnet\Commands\Workload\InstallStateContents.cs" LinkBase="Cli" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@

<Compile Include="$(RepoRoot)src\Common\EnvironmentVariableNames.cs" LinkBase="Common" />
<Compile Include="$(RepoRoot)src\Common\CliFolderPathCalculatorCore.cs" LinkBase="Common" />
<Compile Include="$(RepoRoot)src\Common\Polyfills.cs" LinkBase="Common" />
<Compile Include="$(RepoRoot)src\Common\WorkloadFileBasedInstall.cs" LinkBase="Common" />
<Compile Include="$(RepoRoot)src\Common\WorkloadSetVersion.cs" LinkBase="Common" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<EmbeddedResource Update="**\*.resx" GenerateSource="true" Namespace="Microsoft.NET.Sdk.Localization" />
<Compile Include="..\Microsoft.DotNet.MSBuildSdkResolver\FXVersion.cs" />
<Compile Include="$(RepoRoot)src\Common\EnvironmentVariableNames.cs" LinkBase="Common" />
<Compile Include="$(RepoRoot)src\Common\Polyfills.cs" LinkBase="Common" />
<Compile Include="$(RepoRoot)src\Common\WorkloadFileBasedInstall.cs" LinkBase="Common" />
<Compile Include="$(RepoRoot)src\Common\WorkloadSetVersion.cs" LinkBase="Common" />
<Compile Include="$(RepoRoot)src\Cli\dotnet\Commands\Workload\InstallStateContents.cs" LinkBase="Cli" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
<Compile Include="..\..\Resolvers\Microsoft.DotNet.MSBuildSdkResolver\FXVersion.cs" LinkBase="WorkloadManifestReader" />
<Compile Include="$(RepoRoot)src\Common\EnvironmentVariableNames.cs" LinkBase="Common" />
<Compile Include="$(RepoRoot)src\Common\CliFolderPathCalculatorCore.cs" LinkBase="Common" />
<Compile Include="$(RepoRoot)src\Common\Polyfills.cs" LinkBase="Common" />
<Compile Include="$(RepoRoot)src\Common\WorkloadFileBasedInstall.cs" LinkBase="Common" />
<Compile Include="$(RepoRoot)src\Common\WorkloadSetVersion.cs" LinkBase="Common" />
<Compile Include="$(RepoRoot)src\Cli\dotnet\Commands\Workload\InstallStateContents.cs" LinkBase="Cli" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@

<ItemGroup>
<Compile Include="**\*.cs" Exclude="$(GlobalExclude)" />
<Compile Include="$(RepoRoot)src\Common\Polyfills.cs" LinkBase="Common" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading