Update to NET 8 (#240)

This commit is contained in:
Marko Lahma
2023-12-10 10:52:47 +02:00
committed by GitHub
parent a14dcbf651
commit 269d9b1192
23 changed files with 45 additions and 41 deletions

View File

@@ -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: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_CODE/@EntryValue">1</s:Int64>
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_BLANK_LINES_IN_DECLARATIONS/@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_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_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpUseContinuousIndentInsideBracesMigration/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpUseContinuousIndentInsideBracesMigration/@EntryIndexedValue">True</s:Boolean>

View File

@@ -2,16 +2,17 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<RootNamespace></RootNamespace> <RootNamespace></RootNamespace>
<NoWarn>CS0649;CS0169</NoWarn> <NoWarn>CS0649;CS0169</NoWarn>
<NukeRootDirectory>..\..</NukeRootDirectory> <NukeRootDirectory>..\..</NukeRootDirectory>
<NukeScriptDirectory>..\..</NukeScriptDirectory> <NukeScriptDirectory>..\..</NukeScriptDirectory>
<NukeTelemetryVersion>1</NukeTelemetryVersion> <NukeTelemetryVersion>1</NukeTelemetryVersion>
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Nuke.Common" Version="7.0.2" /> <PackageReference Include="Nuke.Common" Version="7.0.6" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -58,7 +58,7 @@ fi
echo "Microsoft (R) .NET SDK version $("$DOTNET_EXE" --version)" 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 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 "$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 fi

View File

@@ -1,6 +1,6 @@
{ {
"sdk": { "sdk": {
"version": "7.0.0", "version": "8.0.100",
"rollForward": "latestMinor" "rollForward": "latestMinor"
} }
} }

View File

@@ -27,6 +27,8 @@
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">

View File

@@ -37,6 +37,8 @@ using Spring.Util;
using NUnit.Framework; using NUnit.Framework;
#pragma warning disable SYSLIB0050
namespace Spring.Aop.Framework.DynamicProxy namespace Spring.Aop.Framework.DynamicProxy
{ {
/// <summary> /// <summary>

View File

@@ -32,6 +32,8 @@ using Spring.Aop.Framework;
using Spring.Context; using Spring.Context;
using Spring.Objects.Factory; using Spring.Objects.Factory;
#pragma warning disable SYSLIB0050
namespace Spring namespace Spring
{ {
/// <summary> /// <summary>
@@ -132,4 +134,4 @@ namespace Spring
} }
} }
} }
} }

View File

@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0"> <Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net6.0;$(TargetFullFrameworkVersion)</TargetFrameworks> <TargetFrameworks>net8.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
<NoWarn>$(NoWarn);SYSLIB0011</NoWarn> <NoWarn>$(NoWarn);SYSLIB0011</NoWarn>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@@ -17,7 +17,7 @@
<ItemGroup Condition=" '$(TargetFramework)' == '$(TargetFullFrameworkVersion)' "> <ItemGroup Condition=" '$(TargetFramework)' == '$(TargetFullFrameworkVersion)' ">
<Reference Include="System.Web" /> <Reference Include="System.Web" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' "> <ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<Compile Remove="Aop\Framework\AutoProxy\AbstractAutoProxyCreatorTests.cs" /> <Compile Remove="Aop\Framework\AutoProxy\AbstractAutoProxyCreatorTests.cs" />
<Compile Remove="Aop\Framework\Adapter\ThrowsAdviceInterceptorTests.cs" /> <Compile Remove="Aop\Framework\Adapter\ThrowsAdviceInterceptorTests.cs" />
<Compile Remove="Aop\Framework\AutoProxy\AbstractAutoProxyCreatorTests.cs" /> <Compile Remove="Aop\Framework\AutoProxy\AbstractAutoProxyCreatorTests.cs" />

View File

@@ -2,7 +2,7 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFrameworks>net472;net6.0</TargetFrameworks> <TargetFrameworks>net472;net8.0</TargetFrameworks>
<RootNamespace>Spring.Benchmark</RootNamespace> <RootNamespace>Spring.Benchmark</RootNamespace>
</PropertyGroup> </PropertyGroup>

View File

@@ -1,7 +1,7 @@
#region License #region License
/* /*
* Copyright © 2002-2011 the original author or authors. * Copyright <EFBFBD> 2002-2011 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -18,8 +18,6 @@
#endregion #endregion
#region Imports
using System; using System;
using System.Globalization; using System.Globalization;
using System.IO; using System.IO;
@@ -28,7 +26,9 @@ using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary; using System.Runtime.Serialization.Formatters.Binary;
using NUnit.Framework; using NUnit.Framework;
#endregion #pragma warning disable CS0672 // Member overrides obsolete member
#pragma warning disable SYSLIB0050
#pragma warning disable SYSLIB0051
namespace Spring namespace Spring
{ {
@@ -446,4 +446,4 @@ namespace Spring
} }
#endregion #endregion
} }

View File

@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net6.0;$(TargetFullFrameworkVersion)</TargetFrameworks> <TargetFrameworks>net8.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
<NoWarn>$(NoWarn);SYSLIB0001;SYSLIB0003;SYSLIB0011</NoWarn> <NoWarn>$(NoWarn);SYSLIB0001;SYSLIB0003;SYSLIB0011</NoWarn>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly> <ProduceReferenceAssembly>false</ProduceReferenceAssembly>
<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources> <GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
@@ -34,7 +34,7 @@
<Reference Include="System.Web.Services" /> <Reference Include="System.Web.Services" />
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' "> <ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<Compile Remove="Context\Attributes\FailAssemblyObjectDefinitionScannerTests.cs" /> <Compile Remove="Context\Attributes\FailAssemblyObjectDefinitionScannerTests.cs" />
<Compile Remove="Context\Support\ApplicationContextAwareProcessorTests.cs" /> <Compile Remove="Context\Support\ApplicationContextAwareProcessorTests.cs" />
<Compile Remove="Expressions\ExpressionEvaluatorTests.cs" /> <Compile Remove="Expressions\ExpressionEvaluatorTests.cs" />

View File

@@ -18,16 +18,12 @@
#endregion #endregion
#region Imports
using System.IO; using System.IO;
using System.Runtime.Serialization; using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary; using System.Runtime.Serialization.Formatters.Binary;
using NUnit.Framework; using NUnit.Framework;
using Spring.Objects; using Spring.Objects;
#endregion
namespace Spring.Util namespace Spring.Util
{ {
/// <summary> /// <summary>
@@ -83,7 +79,9 @@ namespace Spring.Util
/// <returns>true if the object is serializable, otherwise false.</returns> /// <returns>true if the object is serializable, otherwise false.</returns>
public static bool IsSerializable(object o) public static bool IsSerializable(object o)
{ {
#pragma warning disable SYSLIB0050 // Type or member is obsolete
return o == null ? true : o.GetType().IsSerializable; return o == null ? true : o.GetType().IsSerializable;
#pragma warning restore SYSLIB0050
} }
/// <summary> /// <summary>
@@ -107,4 +105,4 @@ namespace Spring.Util
} }
} }
} }

View File

@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net6.0;$(TargetFullFrameworkVersion)</TargetFrameworks> <TargetFrameworks>net8.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\src\Spring\Spring.Aop\Spring.Aop.csproj" /> <ProjectReference Include="..\..\..\src\Spring\Spring.Aop\Spring.Aop.csproj" />
@@ -22,7 +22,7 @@
<Reference Include="System.Data.OracleClient" /> <Reference Include="System.Data.OracleClient" />
<Reference Include="System.Transactions" /> <Reference Include="System.Transactions" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' "> <ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<Compile Remove="Data\SQLiteTests.cs" /> <Compile Remove="Data\SQLiteTests.cs" />
<Compile Remove="Data\OracleAdoTemplateTests.cs" /> <Compile Remove="Data\OracleAdoTemplateTests.cs" />
</ItemGroup> </ItemGroup>

View File

@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net6.0;$(TargetFullFrameworkVersion)</TargetFrameworks> <TargetFrameworks>net8.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\src\Spring\Spring.Aop\Spring.Aop.csproj" /> <ProjectReference Include="..\..\..\src\Spring\Spring.Aop\Spring.Aop.csproj" />

View File

@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net6.0;$(TargetFullFrameworkVersion)</TargetFrameworks> <TargetFrameworks>net8.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Spring.Data.Tests\Spring.Data.Tests.csproj" /> <ProjectReference Include="..\Spring.Data.Tests\Spring.Data.Tests.csproj" />

View File

@@ -1,7 +1,7 @@
#region License #region License
/* /*
* Copyright © 2002-2011 the original author or authors. * Copyright <EFBFBD> 2002-2011 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -18,8 +18,6 @@
#endregion #endregion
#region Imports
using System; using System;
using System.Runtime.Serialization; using System.Runtime.Serialization;
using NUnit.Framework; using NUnit.Framework;
@@ -27,7 +25,7 @@ using Spring.Aop.Framework;
using Spring.Dao.Support; using Spring.Dao.Support;
using Spring.Stereotype; using Spring.Stereotype;
#endregion #pragma warning disable SYSLIB0051
namespace Spring.Dao.Attributes namespace Spring.Dao.Attributes
{ {

View File

@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net6.0;$(TargetFullFrameworkVersion)</TargetFrameworks> <TargetFrameworks>net8.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute> <GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@@ -23,7 +23,7 @@
<PackageReference Include="NUnit3TestAdapter" /> <PackageReference Include="NUnit3TestAdapter" />
<PackageReference Include="System.Data.SqlClient" /> <PackageReference Include="System.Data.SqlClient" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' "> <ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<Compile Remove="Data\Core\ServiceDomainTransactionManagerTests.cs" /> <Compile Remove="Data\Core\ServiceDomainTransactionManagerTests.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@@ -1,7 +1,7 @@
#region License #region License
/* /*
* Copyright © 2002-2011 the original author or authors. * Copyright <EFBFBD> 2002-2011 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -18,12 +18,12 @@
#endregion #endregion
#region Imports
using System; using System;
using System.Runtime.Serialization; using System.Runtime.Serialization;
#endregion #pragma warning disable CS0672 // Member overrides obsolete member
#pragma warning disable SYSLIB0050
#pragma warning disable SYSLIB0051
namespace Spring.Support namespace Spring.Support
{ {

View File

@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net6.0;$(TargetFullFrameworkVersion)</TargetFrameworks> <TargetFrameworks>net8.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\src\Spring\Spring.Core\Spring.Core.csproj" /> <ProjectReference Include="..\..\..\src\Spring\Spring.Core\Spring.Core.csproj" />

View File

@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net6.0;$(TargetFullFrameworkVersion)</TargetFrameworks> <TargetFrameworks>net8.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\src\Spring\Spring.Core\Spring.Core.csproj" /> <ProjectReference Include="..\..\..\src\Spring\Spring.Core\Spring.Core.csproj" />

View File

@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net6.0;$(TargetFullFrameworkVersion)</TargetFrameworks> <TargetFrameworks>net8.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\src\Spring\Spring.Core\Spring.Core.csproj" /> <ProjectReference Include="..\..\..\src\Spring\Spring.Core\Spring.Core.csproj" />

View File

@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net6.0;$(TargetFullFrameworkVersion)</TargetFrameworks> <TargetFrameworks>net8.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\src\Spring\Spring.Core\Spring.Core.csproj" /> <ProjectReference Include="..\..\..\src\Spring\Spring.Core\Spring.Core.csproj" />
@@ -16,7 +16,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="app.config" /> <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" /> <EmbeddedResource Include="Testing\Microsoft\TestApplicationContext.xml" Condition=" '$(TargetFramework)' == '$(TargetFullFrameworkVersion)' " LogicalName="Spring.Testing.Microsoft.TestApplicationContext.xml" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net6.0;$(TargetFullFrameworkVersion)</TargetFrameworks> <TargetFrameworks>net8.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\src\Spring\Spring.Core\Spring.Core.csproj" /> <ProjectReference Include="..\..\..\src\Spring\Spring.Core\Spring.Core.csproj" />