Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use .NET 8 and removed .NET 6 #600

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build/build.csx
Original file line number Diff line number Diff line change
@@ -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"

Expand All @@ -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")]
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "7.0.100",
"version": "8.0.402",
"rollForward": "latestFeature"
}
}
2 changes: 1 addition & 1 deletion omnisharp.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
},
"script": {
"enableScriptNuGetReferences": true,
"defaultTargetFramework": "net6.0"
"defaultTargetFramework": "net8.0"
}
}
1 change: 1 addition & 0 deletions packlocal.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dotnet pack "src/LightInject/LightInject.csproj" --configuration Release --output "build/Artifacts/NuGet" /property:Version=$1
10 changes: 5 additions & 5 deletions src/LightInject.Benchmarks/LightInject.Benchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.5" />
<PackageReference Include="DryIoc" Version="5.4.0" />
<PackageReference Include="BenchmarkDotNet" Version="0.14.0" />
<PackageReference Include="DryIoc" Version="5.4.3" />
<PackageReference Include="Grace" Version="7.2.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="SimpleInjector" Version="5.4.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
<PackageReference Include="SimpleInjector" Version="5.5.0" />
<PackageReference Include="ImTools" Version="4.0.0" />
</ItemGroup>
<ItemGroup>
Expand Down
22 changes: 11 additions & 11 deletions src/LightInject.Tests/LightInject.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<NoWarn>$(NoWarn);CS0579</NoWarn>
<TestTargetFrameworks>net6.0;netstandard2.0</TestTargetFrameworks>
<TestTargetFramework>net6.0</TestTargetFramework>
<TestTargetFrameworks>net8.0;netstandard2.0</TestTargetFrameworks>
<TestTargetFramework>net8.0</TestTargetFramework>
</PropertyGroup>
<Choose>
<When Condition=" '$(TestTargetFramework)'=='netstandard2.0' ">
Expand All @@ -13,26 +13,26 @@
</PropertyGroup>
</When>
</Choose>
<PropertyGroup Condition=" '$(TestTargetFramework)'=='net6.0' ">
<PropertyGroup Condition=" '$(TestTargetFramework)'=='net8.0' ">
<DefineConstants>USE_ASSEMBLY_VERIFICATION;USE_ASYNCDISPOSABLE</DefineConstants>
</PropertyGroup>
<ItemGroup Condition=" '$(TestTargetFramework)' == 'net46' OR '$(TestTargetFramework)' == 'netstandard2.0'">
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="7.0.0" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="3.2.0">
<PackageReference Include="coverlet.collector" Version="6.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="LightMock" Version="2.0.1" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.5.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.11.0" />
<PackageReference Include="System.Reflection.Emit" Version="4.7.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="System.Reflection.Emit.ILGeneration" Version="4.7.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xUnit.Analyzers" Version="1.1.0" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xUnit.Analyzers" Version="1.16.0" />
<PackageReference Include="ILVerifier" Version="0.0.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion src/LightInject/LightInject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4433,7 +4433,7 @@ private Action<IEmitter> 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<IEmitter> listEmitMethod = CreateEmitMethodForListServiceRequest(serviceType);

Expand Down
8 changes: 4 additions & 4 deletions src/LightInject/LightInject.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;netstandard2.0;netcoreapp3.1;net462</TargetFrameworks>
<Version>6.6.4</Version>
<TargetFrameworks>net8.0;netstandard2.0;net462</TargetFrameworks>
<Version>7.0.0</Version>
<Authors>Bernhard Richter</Authors>
<PackageProjectUrl>https://www.lightinject.net</PackageProjectUrl>
<RepositoryType>git</RepositoryType>
Expand Down Expand Up @@ -34,7 +34,7 @@
</When>
</Choose>
<Choose>
<When Condition=" '$(TargetFramework)'=='net6.0' Or '$(TestTargetFramework)'=='net6.0'">
<When Condition=" '$(TargetFramework)'=='net8.0' Or '$(TestTargetFramework)'=='net8.0'">
<PropertyGroup>
<DefineConstants>USE_ASYNCDISPOSABLE</DefineConstants>
</PropertyGroup>
Expand All @@ -45,7 +45,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference> -->
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
Loading