From 808e3fb1b1ce63716e366e7f01f8143e40d03c56 Mon Sep 17 00:00:00 2001 From: Bernhard Richter Date: Mon, 28 Oct 2024 00:13:34 +0100 Subject: [PATCH] Use .net8 --- global.json | 2 +- src/LightInject.Tests/LightInject.Tests.csproj | 8 ++++---- src/LightInject/LightInject.cs | 2 +- src/LightInject/LightInject.csproj | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/global.json b/global.json index f04f9d06..9df6ea19 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "7.0.100", + "version": "8.0.402", "rollForward": "latestFeature" } } \ No newline at end of file diff --git a/src/LightInject.Tests/LightInject.Tests.csproj b/src/LightInject.Tests/LightInject.Tests.csproj index 81604e75..2007d012 100644 --- a/src/LightInject.Tests/LightInject.Tests.csproj +++ b/src/LightInject.Tests/LightInject.Tests.csproj @@ -1,10 +1,10 @@  - net7.0 + net8.0 $(NoWarn);CS0579 - net6.0;netstandard2.0 - net6.0 + net8.0;netstandard2.0 + net8.0 @@ -13,7 +13,7 @@ - + USE_ASSEMBLY_VERIFICATION;USE_ASYNCDISPOSABLE diff --git a/src/LightInject/LightInject.cs b/src/LightInject/LightInject.cs index 6dac2e7f..3d8fadaa 100644 --- a/src/LightInject/LightInject.cs +++ b/src/LightInject/LightInject.cs @@ -4675,7 +4675,7 @@ private Action CreateEmitMethodForReadOnlyCollectionServiceRequest(Typ Type elementType = TypeHelper.GetElementType(serviceType); Type closedGenericReadOnlyCollectionType = typeof(ReadOnlyCollection<>).MakeGenericType(elementType); ConstructorInfo constructorInfo = - closedGenericReadOnlyCollectionType.GetTypeInfo().DeclaredConstructors.Single(); + closedGenericReadOnlyCollectionType.GetTypeInfo().DeclaredConstructors.Where(c => c.GetParameters().Length == 1).Single(); Action listEmitMethod = CreateEmitMethodForListServiceRequest(serviceType, serviceName); diff --git a/src/LightInject/LightInject.csproj b/src/LightInject/LightInject.csproj index 3ce9e967..7acd2816 100644 --- a/src/LightInject/LightInject.csproj +++ b/src/LightInject/LightInject.csproj @@ -1,7 +1,7 @@  - net6.0;netstandard2.0;netcoreapp3.1;net462 + net8.0;netstandard2.0;netcoreapp3.1;net462 6.6.4 Bernhard Richter https://www.lightinject.net @@ -34,7 +34,7 @@ - + USE_ASYNCDISPOSABLE