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: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>

View File

@@ -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>

View File

@@ -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

View File

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

View File

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

View File

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

View File

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

View File

@@ -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>
@@ -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" />

View File

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

View File

@@ -1,7 +1,7 @@
#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");
* you may not use this file except in compliance with the License.
@@ -18,8 +18,6 @@
#endregion
#region Imports
using System;
using System.Globalization;
using System.IO;
@@ -28,7 +26,9 @@ using System.Runtime.Serialization;
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
{
@@ -446,4 +446,4 @@ namespace Spring
}
#endregion
}
}

View File

@@ -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>
@@ -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" />

View File

@@ -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>
@@ -83,7 +79,9 @@ namespace Spring.Util
/// <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>
@@ -107,4 +105,4 @@ namespace Spring.Util
}
}
}
}

View File

@@ -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" />
@@ -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>

View File

@@ -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" />

View File

@@ -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" />

View File

@@ -1,7 +1,7 @@
#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");
* you may not use this file except in compliance with the License.
@@ -18,8 +18,6 @@
#endregion
#region Imports
using System;
using System.Runtime.Serialization;
using NUnit.Framework;
@@ -27,7 +25,7 @@ using Spring.Aop.Framework;
using Spring.Dao.Support;
using Spring.Stereotype;
#endregion
#pragma warning disable SYSLIB0051
namespace Spring.Dao.Attributes
{

View File

@@ -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>
@@ -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>

View File

@@ -1,7 +1,7 @@
#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");
* you may not use this file except in compliance with the License.
@@ -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
{

View File

@@ -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" />

View File

@@ -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" />

View File

@@ -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" />

View File

@@ -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" />
@@ -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>

View File

@@ -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" />