diff --git a/build/build.csx b/build/build.csx index 42db60d0..5869fb61 100644 --- a/build/build.csx +++ b/build/build.csx @@ -1,4 +1,4 @@ -#load "nuget:Dotnet.Build, 0.16.1" +#load "nuget:Dotnet.Build, 0.23.0" #load "nuget:github-changelog, 0.1.5" #load "nuget:dotnet-steps, 0.0.2" @@ -11,7 +11,7 @@ using static ReleaseManagement; [StepDescription("Runs the tests with test coverage")] Step testcoverage = () => { - DotNet.TestWithCodeCoverage(Path.GetDirectoryName(BuildContext.TestProjects[0]), BuildContext.TestCoverageArtifactsFolder, BuildContext.CodeCoverageThreshold, "net7.0"); + DotNet.TestWithCodeCoverage(Path.GetDirectoryName(BuildContext.TestProjects[0]), BuildContext.TestCoverageArtifactsFolder, BuildContext.CodeCoverageThreshold, "net8.0"); }; [StepDescription("Runs all the tests for all target frameworks")] 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/omnisharp.json b/omnisharp.json index 4993383a..75f99d44 100644 --- a/omnisharp.json +++ b/omnisharp.json @@ -9,6 +9,6 @@ }, "script": { "enableScriptNuGetReferences": true, - "defaultTargetFramework": "net6.0" + "defaultTargetFramework": "net8.0" } } \ No newline at end of file diff --git a/packlocal.sh b/packlocal.sh new file mode 100755 index 00000000..a01dce6f --- /dev/null +++ b/packlocal.sh @@ -0,0 +1 @@ +dotnet pack "src/LightInject/LightInject.csproj" --configuration Release --output "build/Artifacts/NuGet" /property:Version=$1 diff --git a/src/LightInject.Benchmarks/LightInject.Benchmarks.csproj b/src/LightInject.Benchmarks/LightInject.Benchmarks.csproj index 856f0ccb..5640ca49 100644 --- a/src/LightInject.Benchmarks/LightInject.Benchmarks.csproj +++ b/src/LightInject.Benchmarks/LightInject.Benchmarks.csproj @@ -2,16 +2,16 @@ Exe - net6.0 + net8.0 false false - - + + - - + + diff --git a/src/LightInject.Tests/LightInject.Tests.csproj b/src/LightInject.Tests/LightInject.Tests.csproj index 66bb94cd..1ce2da34 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,26 +13,26 @@ - + USE_ASSEMBLY_VERIFICATION;USE_ASYNCDISPOSABLE - + - + runtime; build; native; contentfiles; analyzers; buildtransitive all - + - + - - + + - + all runtime; build; native; contentfiles; analyzers diff --git a/src/LightInject/LightInject.cs b/src/LightInject/LightInject.cs index 6990970b..aea102e2 100644 --- a/src/LightInject/LightInject.cs +++ b/src/LightInject/LightInject.cs @@ -4433,7 +4433,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.Single(c => c.IsPublic); Action listEmitMethod = CreateEmitMethodForListServiceRequest(serviceType); diff --git a/src/LightInject/LightInject.csproj b/src/LightInject/LightInject.csproj index 0b54148d..9179ebbf 100644 --- a/src/LightInject/LightInject.csproj +++ b/src/LightInject/LightInject.csproj @@ -1,8 +1,8 @@  - net6.0;netstandard2.0;netcoreapp3.1;net462 - 6.6.4 + net8.0;netstandard2.0;net462 + 7.0.0 Bernhard Richter https://www.lightinject.net git @@ -34,7 +34,7 @@ - + USE_ASYNCDISPOSABLE @@ -45,7 +45,7 @@ all runtime; build; native; contentfiles; analyzers --> - + all runtime; build; native; contentfiles; analyzers