Skip to content

Commit 5e188a5

Browse files
committed
fix: enable samples to build .net 9
1 parent 74035d9 commit 5e188a5

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

docs/samples/components/bunit.docs.samples.csproj

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
5-
<LangVersion>10.0</LangVersion>
4+
<TargetFrameworks>netstandard2.0;net5.0;net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
5+
<LangVersion>latest</LangVersion>
66
<RazorLangVersion>3.0</RazorLangVersion>
77
<RootNamespace>Bunit.Docs.Samples</RootNamespace>
88
<ImplicitUsings>enable</ImplicitUsings>
@@ -50,4 +50,12 @@
5050
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="8.0.0" />
5151
</ItemGroup>
5252

53+
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
54+
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.0-*" />
55+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.0-*" />
56+
<PackageReference Include="Microsoft.AspNetCore.Components" Version="9.0.0-*" />
57+
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="9.0.0-*" />
58+
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="9.0.0-*" />
59+
</ItemGroup>
60+
5361
</Project>

docs/samples/tests/Directory.Build.props

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
3+
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
44
<IsPackable>false</IsPackable>
55
<SonarQubeTestProject>true</SonarQubeTestProject>
66
<IsPackable>false</IsPackable>
@@ -16,6 +16,10 @@
1616
<PackageReference Include="System.Text.Json" Version="8.0.0" />
1717
</ItemGroup>
1818

19+
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
20+
<PackageReference Include="System.Text.Json" Version="9.0.0-*" />
21+
</ItemGroup>
22+
1923
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1' OR '$(TargetFramework)' == 'net5.0'">
2024
<PackageReference Include="System.Text.Json" Version="6.0.9" />
2125
</ItemGroup>

0 commit comments

Comments
 (0)