Skip to content

Commit

Permalink
Update to NET 8
Browse files Browse the repository at this point in the history
  • Loading branch information
lahma committed Dec 10, 2023
1 parent 3b1a234 commit a78ab91
Show file tree
Hide file tree
Showing 22 changed files with 43 additions and 41 deletions.
1 change: 1 addition & 0 deletions Spring.Net.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
<s:String x:Key="/Default/CodeStyle/Naming/XamlNaming/UserRules/=XAML_005FRESOURCE/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;</s:String>
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_BLANK_LINES_IN_CODE/@EntryValue">1</s:Int64>
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_BLANK_LINES_IN_DECLARATIONS/@EntryValue">1</s:Int64>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EFeature_002EServices_002ECodeCleanup_002EFileHeader_002EFileHeaderSettingsMigrate/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpUseContinuousIndentInsideBracesMigration/@EntryIndexedValue">True</s:Boolean>
Expand Down
5 changes: 3 additions & 2 deletions build-support/nuke-build/_build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace></RootNamespace>
<NoWarn>CS0649;CS0169</NoWarn>
<NukeRootDirectory>..\..</NukeRootDirectory>
<NukeScriptDirectory>..\..</NukeScriptDirectory>
<NukeTelemetryVersion>1</NukeTelemetryVersion>
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Nuke.Common" Version="7.0.2" />
<PackageReference Include="Nuke.Common" Version="7.0.6" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ fi

echo "Microsoft (R) .NET SDK version $("$DOTNET_EXE" --version)"

if [[ ! -z ${NUKE_ENTERPRISE_TOKEN+x} && "NUKE_ENTERPRISE_TOKEN" != "" ]]; then
if [[ ! -z ${NUKE_ENTERPRISE_TOKEN+x} && "$NUKE_ENTERPRISE_TOKEN" != "" ]]; then
"$DOTNET_EXE" nuget remove source "nuke-enterprise" &>/dev/null || true
"$DOTNET_EXE" nuget add source "https://f.feedz.io/nuke/enterprise/nuget" --name "nuke-enterprise" --username "PAT" --password "$NUKE_ENTERPRISE_TOKEN" --store-password-in-clear-text &>/dev/null || true
fi
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "7.0.0",
"version": "8.0.100",
"rollForward": "latestMinor"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@

using NUnit.Framework;

#pragma warning disable SYSLIB0050

namespace Spring.Aop.Framework.DynamicProxy
{
/// <summary>
Expand Down
4 changes: 3 additions & 1 deletion test/Spring/Spring.Aop.Tests/AopSerializationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
using Spring.Context;
using Spring.Objects.Factory;

#pragma warning disable SYSLIB0050

namespace Spring
{
/// <summary>
Expand Down Expand Up @@ -132,4 +134,4 @@ private object SerializeAndDeserialize(object s)
}
}
}
}
}
4 changes: 2 additions & 2 deletions test/Spring/Spring.Aop.Tests/Spring.Aop.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<PropertyGroup>
<TargetFrameworks>net6.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
<TargetFrameworks>net8.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
<NoWarn>$(NoWarn);SYSLIB0011</NoWarn>
</PropertyGroup>
<ItemGroup>
Expand All @@ -17,7 +17,7 @@
<ItemGroup Condition=" '$(TargetFramework)' == '$(TargetFullFrameworkVersion)' ">
<Reference Include="System.Web" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<Compile Remove="Aop\Framework\AutoProxy\AbstractAutoProxyCreatorTests.cs" />
<Compile Remove="Aop\Framework\Adapter\ThrowsAdviceInterceptorTests.cs" />
<Compile Remove="Aop\Framework\AutoProxy\AbstractAutoProxyCreatorTests.cs" />
Expand Down
2 changes: 1 addition & 1 deletion test/Spring/Spring.Benchmark/Spring.Benchmark.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net472;net6.0</TargetFrameworks>
<TargetFrameworks>net472;net8.0</TargetFrameworks>
<RootNamespace>Spring.Benchmark</RootNamespace>
</PropertyGroup>

Expand Down
10 changes: 5 additions & 5 deletions test/Spring/Spring.Core.Tests/ExceptionsTest.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#region License

/*
* Copyright © 2002-2011 the original author or authors.
* Copyright 2002-2011 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,8 +18,6 @@

#endregion

#region Imports

using System;
using System.Globalization;
using System.IO;
Expand All @@ -28,7 +26,9 @@
using System.Runtime.Serialization.Formatters.Binary;
using NUnit.Framework;

#endregion
#pragma warning disable CS0672 // Member overrides obsolete member
#pragma warning disable SYSLIB0050
#pragma warning disable SYSLIB0051

namespace Spring
{
Expand Down Expand Up @@ -446,4 +446,4 @@ private SealedTestException(
}

#endregion
}
}
4 changes: 2 additions & 2 deletions test/Spring/Spring.Core.Tests/Spring.Core.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
<TargetFrameworks>net8.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
<NoWarn>$(NoWarn);SYSLIB0001;SYSLIB0003;SYSLIB0011</NoWarn>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
Expand Down Expand Up @@ -34,7 +34,7 @@
<Reference Include="System.Web.Services" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<Compile Remove="Context\Attributes\FailAssemblyObjectDefinitionScannerTests.cs" />
<Compile Remove="Context\Support\ApplicationContextAwareProcessorTests.cs" />
<Compile Remove="Expressions\ExpressionEvaluatorTests.cs" />
Expand Down
8 changes: 3 additions & 5 deletions test/Spring/Spring.Core.Tests/Util/SerializationTestUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,12 @@

#endregion

#region Imports

using System.IO;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using NUnit.Framework;
using Spring.Objects;

#endregion

namespace Spring.Util
{
/// <summary>
Expand Down Expand Up @@ -83,7 +79,9 @@ public static void TrySerialization(object o)
/// <returns>true if the object is serializable, otherwise false.</returns>
public static bool IsSerializable(object o)
{
#pragma warning disable SYSLIB0050 // Type or member is obsolete
return o == null ? true : o.GetType().IsSerializable;
#pragma warning restore SYSLIB0050
}

/// <summary>
Expand All @@ -107,4 +105,4 @@ public static object SerializeAndDeserialize(object o)
}

}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
<TargetFrameworks>net8.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\Spring\Spring.Aop\Spring.Aop.csproj" />
Expand All @@ -22,7 +22,7 @@
<Reference Include="System.Data.OracleClient" />
<Reference Include="System.Transactions" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<Compile Remove="Data\SQLiteTests.cs" />
<Compile Remove="Data\OracleAdoTemplateTests.cs" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
<TargetFrameworks>net8.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\Spring\Spring.Aop\Spring.Aop.csproj" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
<TargetFrameworks>net8.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Spring.Data.Tests\Spring.Data.Tests.csproj" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#region License

/*
* Copyright © 2002-2011 the original author or authors.
* Copyright 2002-2011 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,16 +18,14 @@

#endregion

#region Imports

using System;
using System.Runtime.Serialization;
using NUnit.Framework;
using Spring.Aop.Framework;
using Spring.Dao.Support;
using Spring.Stereotype;

#endregion
#pragma warning disable SYSLIB0051

namespace Spring.Dao.Attributes
{
Expand Down
4 changes: 2 additions & 2 deletions test/Spring/Spring.Data.Tests/Spring.Data.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
<TargetFrameworks>net8.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
</PropertyGroup>
<ItemGroup>
Expand All @@ -23,7 +23,7 @@
<PackageReference Include="NUnit3TestAdapter" />
<PackageReference Include="System.Data.SqlClient" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<Compile Remove="Data\Core\ServiceDomainTransactionManagerTests.cs" />
</ItemGroup>
<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions test/Spring/Spring.Data.Tests/Support/TestSqlException.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#region License

/*
* Copyright © 2002-2011 the original author or authors.
* Copyright 2002-2011 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,12 +18,12 @@

#endregion

#region Imports

using System;
using System.Runtime.Serialization;

#endregion
#pragma warning disable CS0672 // Member overrides obsolete member
#pragma warning disable SYSLIB0050
#pragma warning disable SYSLIB0051

namespace Spring.Support
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
<TargetFrameworks>net8.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\Spring\Spring.Core\Spring.Core.csproj" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
<TargetFrameworks>net8.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\Spring\Spring.Core\Spring.Core.csproj" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
<TargetFrameworks>net8.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\Spring\Spring.Core\Spring.Core.csproj" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
<TargetFrameworks>net8.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\Spring\Spring.Core\Spring.Core.csproj" />
Expand All @@ -16,7 +16,7 @@
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<EmbeddedResource Include="Testing\Microsoft\TestApplicationContext_netcore.xml" Condition=" '$(TargetFramework)' == 'net6.0' " LogicalName="Spring.Testing.Microsoft.TestApplicationContext.xml" />
<EmbeddedResource Include="Testing\Microsoft\TestApplicationContext_netcore.xml" Condition=" '$(TargetFramework)' == 'net8.0' " LogicalName="Spring.Testing.Microsoft.TestApplicationContext.xml" />
<EmbeddedResource Include="Testing\Microsoft\TestApplicationContext.xml" Condition=" '$(TargetFramework)' == '$(TargetFullFrameworkVersion)' " LogicalName="Spring.Testing.Microsoft.TestApplicationContext.xml" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
<TargetFrameworks>net8.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\Spring\Spring.Core\Spring.Core.csproj" />
Expand Down

0 comments on commit a78ab91

Please sign in to comment.