Skip to content

Commit

Permalink
update test and example packagerefs
Browse files Browse the repository at this point in the history
  • Loading branch information
alexalok committed Jan 2, 2024
1 parent 74f1095 commit 2676826
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion dotWork.Example/dotWork.Example.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="[6.0.1,7.0)" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions dotWork.Tests/ReflectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ static class ReflectionExtensions
{
public static Task GetExecutingTask(this BackgroundService workHost)
{
var fieldInfo = typeof(BackgroundService).GetField("_executingTask", BindingFlags.Instance | BindingFlags.NonPublic);
return (Task) fieldInfo!.GetValue(workHost)!;
return workHost.ExecuteTask!;
}
}
}
21 changes: 11 additions & 10 deletions dotWork.Tests/dotWork.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="InternalsVisibleTo.MSBuild" Version="1.0.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
<PackageReference Include="Moq" Version="4.16.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<!-- 7.x doesn't support .NET 5 -->
<PackageReference Include="Microsoft.Extensions.Hosting" Version="[6.0.1,7.0)" />

<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="Moq" Version="4.20.70" />
<PackageReference Include="xunit" Version="2.6.4" />

<!-- 2.5.x doesn't support .NET 5 -->
<PackageReference Include="xunit.runner.visualstudio" Version="[2.4.5,2.5)">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.0.2">

<PackageReference Include="coverlet.collector" Version="6.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down

0 comments on commit 2676826

Please sign in to comment.