Skip to content

Commit

Permalink
Update to .NET 9 preview 1
Browse files Browse the repository at this point in the history
Update to preview 1 of .NET 9.
  • Loading branch information
martincostello committed Feb 13, 2024
1 parent d0a9861 commit 88e712b
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .vsconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"components": [
"Microsoft.VisualStudio.Component.CoreEditor",
"Microsoft.VisualStudio.Workload.CoreEditor",
"Microsoft.NetCore.Component.Runtime.8.0",
"Microsoft.NetCore.Component.Runtime.9.0",
"Microsoft.NetCore.Component.SDK",
"Microsoft.VisualStudio.Component.Roslyn.Compiler",
"Microsoft.VisualStudio.Component.Roslyn.LanguageServices"
Expand Down
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<LangVersion>latest</LangVersion>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<NeutralLanguage>en-US</NeutralLanguage>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<NoWarn>$(NoWarn);CA1515;CS1591</NoWarn>
<NoWarn Condition=" '$(GenerateDocumentationFile)' != 'true' ">$(NoWarn);SA0001</NoWarn>
<Nullable>enable</Nullable>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
Expand All @@ -36,7 +36,7 @@
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<UseArtifactsOutput>true</UseArtifactsOutput>
<VersionPrefix>8.0.0</VersionPrefix>
<VersionPrefix>9.0.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
<ItemGroup>
Expand Down
4 changes: 0 additions & 4 deletions benchmark.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ param(
$ErrorActionPreference = "Stop"
$ProgressPreference = "SilentlyContinue"

if ($null -eq $env:MSBUILDTERMINALLOGGER) {
$env:MSBUILDTERMINALLOGGER = "auto"
}

$solutionPath = $PSScriptRoot
$sdkFile = Join-Path $solutionPath "global.json"

Expand Down
4 changes: 0 additions & 4 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#! /usr/bin/env pwsh

if ($null -eq $env:MSBUILDTERMINALLOGGER) {
$env:MSBUILDTERMINALLOGGER = "auto"
}

$Configuration = "Release"
$ErrorActionPreference = "Stop"
$ProgressPreference = "SilentlyContinue"
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.200",
"version": "9.0.100-preview.1.24101.2",
"allowPrerelease": false,
"rollForward": "latestMajor"
}
Expand Down
4 changes: 2 additions & 2 deletions src/ProjectEuler/Maths.cs
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,9 @@ internal static bool IsAbundantNumber(long value)
internal static bool IsPandigital(long value, bool allowZero = false)
{
IReadOnlyList<int> digits = Digits(value);
IReadOnlyList<int> distinctDigits = digits.Distinct().ToArray();
int[] distinctDigits = digits.Distinct().ToArray();

if (digits.Count != distinctDigits.Count)
if (digits.Count != distinctDigits.Length)
{
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/ProjectEuler/ProjectEuler.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<PreserveCompilationContext>true</PreserveCompilationContext>
<PublishAot>true</PublishAot>
<RootNamespace>MartinCostello.ProjectEuler</RootNamespace>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<EmbeddedResource Include="Puzzles\**\*.txt" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<OutputType>Exe</OutputType>
<RootNamespace>MartinCostello.ProjectEuler.Benchmarks</RootNamespace>
<Summary>Benchmarks for ProjectEuler.</Summary>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\ProjectEuler\ProjectEuler.csproj" />
Expand Down
2 changes: 1 addition & 1 deletion tests/ProjectEuler.Tests/ProjectEuler.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<NoWarn>$(NoWarn);CA1707;CA1812;CA1861;CA2007;SA1600</NoWarn>
<RootNamespace>MartinCostello.ProjectEuler</RootNamespace>
<Summary>Tests for ProjectEuler.</Summary>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
Expand Down

0 comments on commit 88e712b

Please sign in to comment.