@@ -131,18 +131,18 @@ dotnet add package bunit --version #{NBGV_NuGetPackageVersion}#
131131The test projects setting needs to be set to the following:
132132
133133- the project's SDK needs to be set to ` Microsoft.NET.Sdk.Razor `
134- - set the ` <TargetFramework> ` to ` net7 .0`
134+ - set the ` <TargetFramework> ` to ` net8 .0`
135135
136136> [ !NOTE]
137- > bUnit works with ` net6.0 ` , ` net5.0 ` and ` netcoreapp3.1 ` /` netstandard2.1 ` test projects as well.
137+ > bUnit works with ` net7.0 ` , ` net6.0 ` , ` net5.0 ` and ` netcoreapp3.1 ` /` netstandard2.1 ` test projects as well.
138138
139139To do so, change the first part of the test projects ` .csproj ` file to look like this.:
140140
141141``` xml
142142<Project Sdk =" Microsoft.NET.Sdk.Razor" >
143143
144144 <PropertyGroup >
145- <TargetFramework >net7 .0</TargetFramework >
145+ <TargetFramework >net8 .0</TargetFramework >
146146 </PropertyGroup > ...
147147
148148</Project >
@@ -165,20 +165,20 @@ The result should be a test project with a `.csproj` that looks like this (non b
165165<Project Sdk =" Microsoft.NET.Sdk.Razor" >
166166
167167 <PropertyGroup >
168- <TargetFramework >net7 .0</TargetFramework >
168+ <TargetFramework >net8 .0</TargetFramework >
169169 <Nullable >enable</Nullable >
170170 <IsPackable >false</IsPackable >
171171 </PropertyGroup >
172172
173173 <ItemGroup >
174174 <PackageReference Include =" bunit" Version =" #{RELEASE_VERSION}#" />
175- <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 17.5 .0" />
176- <PackageReference Include =" xunit" Version =" 2.4 .2" />
177- <PackageReference Include =" xunit.runner.visualstudio" Version =" 2.4.5 " >
175+ <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 17.8 .0" />
176+ <PackageReference Include =" xunit" Version =" 2.6 .2" />
177+ <PackageReference Include =" xunit.runner.visualstudio" Version =" 2.5.4 " >
178178 <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
179179 <PrivateAssets >all</PrivateAssets >
180180 </PackageReference >
181- <PackageReference Include =" coverlet.collector" Version =" 3.2 .0" />
181+ <PackageReference Include =" coverlet.collector" Version =" 6.0 .0" />
182182 </ItemGroup >
183183
184184 <ItemGroup >
@@ -194,17 +194,17 @@ The result should be a test project with a `.csproj` that looks like this (non b
194194<Project Sdk =" Microsoft.NET.Sdk.Razor" >
195195
196196 <PropertyGroup >
197- <TargetFramework >net7 .0</TargetFramework >
197+ <TargetFramework >net8 .0</TargetFramework >
198198 <Nullable >enable</Nullable >
199199 <IsPackable >false</IsPackable >
200200 </PropertyGroup >
201201
202202 <ItemGroup >
203203 <PackageReference Include =" bunit" Version =" #{RELEASE_VERSION}#" />
204- <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 17.5 .0" />
205- <PackageReference Include =" NUnit" Version =" 3.13.3 " />
206- <PackageReference Include =" NUnit3TestAdapter" Version =" 4.4.2 " />
207- <PackageReference Include =" coverlet.collector" Version =" 3.2 .0" />
204+ <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 17.8 .0" />
205+ <PackageReference Include =" NUnit" Version =" 3.14.0 " />
206+ <PackageReference Include =" NUnit3TestAdapter" Version =" 4.5.0 " />
207+ <PackageReference Include =" coverlet.collector" Version =" 6.0 .0" />
208208 </ItemGroup >
209209
210210 <ItemGroup >
@@ -220,17 +220,17 @@ The result should be a test project with a `.csproj` that looks like this (non b
220220<Project Sdk =" Microsoft.NET.Sdk.Razor" >
221221
222222 <PropertyGroup >
223- <TargetFramework >net7 .0</TargetFramework >
223+ <TargetFramework >net8 .0</TargetFramework >
224224 <Nullable >enable</Nullable >
225225 <IsPackable >false</IsPackable >
226226 </PropertyGroup >
227227
228228 <ItemGroup >
229229 <PackageReference Include =" bunit" Version =" #{RELEASE_VERSION}#" />
230- <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 17.5 .0" />
231- <PackageReference Include =" MSTest.TestAdapter" Version =" 3.0.2 " />
232- <PackageReference Include =" MSTest.TestFramework" Version =" 3.0.2 " />
233- <PackageReference Include =" coverlet.collector" Version =" 3.2 .0" />
230+ <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 17.8 .0" />
231+ <PackageReference Include =" MSTest.TestAdapter" Version =" 3.1.1 " />
232+ <PackageReference Include =" MSTest.TestFramework" Version =" 3.1.1 " />
233+ <PackageReference Include =" coverlet.collector" Version =" 6.0 .0" />
234234 </ItemGroup >
235235
236236 <ItemGroup >
0 commit comments