Skip to content

Commit 7b2cbf4

Browse files
authored
Merge pull request #33 from faddiv/master
Update project to .net 6
2 parents 941cc03 + bbf4d62 commit 7b2cbf4

File tree

10 files changed

+41
-20
lines changed

10 files changed

+41
-20
lines changed

appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
version: '{build}'
2-
image: Visual Studio 2019
2+
image: Visual Studio 2022
33
configuration: Release
44

55
before_build:

global.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"msbuild-sdks": {
3-
"MSBuild.Sdk.Extras": "2.0.54"
3+
"MSBuild.Sdk.Extras": "3.0.44"
44
}
55
}

samples/FluentAssertions.AspNetCore.Mvc.Sample.Tests/FluentAssertions.AspNetCore.Mvc.Sample.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netcoreapp2.1;netcoreapp3.0</TargetFrameworks>
4+
<TargetFrameworks>netcoreapp2.1;netcoreapp3.0;net6.0</TargetFrameworks>
55

66
<IsPackable>false</IsPackable>
77
</PropertyGroup>

samples/FluentAssertions.AspNetCore.Mvc.Sample/FluentAssertions.AspNetCore.Mvc.Sample.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<Project Sdk="Microsoft.NET.Sdk.Web">
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netcoreapp2.1;netcoreapp3.0</TargetFrameworks>
4+
<TargetFrameworks>netcoreapp2.1;netcoreapp3.0;net6.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
8-
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.1.4" />
8+
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.1.34" />
99
</ItemGroup>
1010

1111
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">

samples/FluentAssertions.AspNetCore.Mvc.Sample/Startup.cs

+17-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,21 @@
33
using Microsoft.Extensions.Configuration;
44
using Microsoft.Extensions.DependencyInjection;
55
using Microsoft.Extensions.Logging;
6+
#if NETCOREAPP3_0_OR_GREATER
7+
using Microsoft.Extensions.Hosting;
8+
#endif
69

710
namespace FluentAssertions.AspNetCore.Mvc.Sample
811
{
912
public class Startup
1013
{
11-
public Startup(IHostingEnvironment env)
14+
public Startup(
15+
#if NETCOREAPP3_0_OR_GREATER
16+
IWebHostEnvironment env
17+
#else
18+
IHostingEnvironment env
19+
#endif
20+
)
1221
{
1322
var builder = new ConfigurationBuilder()
1423
.SetBasePath(env.ContentRootPath)
@@ -39,7 +48,13 @@ public void ConfigureServices(IServiceCollection services)
3948
}
4049

4150
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
42-
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
51+
public void Configure(IApplicationBuilder app,
52+
#if NETCOREAPP3_0_OR_GREATER
53+
IWebHostEnvironment env,
54+
#else
55+
IHostingEnvironment env,
56+
#endif
57+
ILoggerFactory loggerFactory)
4358
{
4459
if (env.IsDevelopment())
4560
{

src/FluentAssertions.AspNetCore.Mvc.Ref/FluentAssertions.AspNetCore.Mvc.Ref.csproj

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
<Project Sdk="MSBuild.Sdk.Extras">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;netcoreapp3.0</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.0;netcoreapp3.0;net6.0</TargetFrameworks>
55
</PropertyGroup>
66

7-
<ItemGroup>
8-
<PackageReference Include="FluentAssertions" Version="6.0.0" />
9-
</ItemGroup>
7+
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
8+
<PackageReference Include="FluentAssertions" Version="6.6.0" />
9+
<FrameworkReference Include="Microsoft.AspNetCore.App" />
10+
</ItemGroup>
1011

1112
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
13+
<PackageReference Include="FluentAssertions" Version="6.0.0" />
1214
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.1.0" />
1315
</ItemGroup>
1416

1517
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
18+
<PackageReference Include="FluentAssertions" Version="6.0.0" />
1619
<FrameworkReference Include="Microsoft.AspNetCore.App" />
1720
</ItemGroup>
1821

src/FluentAssertions.AspNetCore.Mvc/FluentAssertions.AspNetCore.Mvc.csproj

+8-5
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
<Copyright>Copyright 2018</Copyright>
66
<AssemblyTitle>Fluent Assertions extensions for ASP.NET Core MVC</AssemblyTitle>
77
<Title>Fluent Assertions for ASP.NET Core MVC</Title>
8-
<VersionPrefix>4.2.0</VersionPrefix>
8+
<VersionPrefix>4.3.0</VersionPrefix>
99
<Authors>Casey Burns;Kevin Kuszyk</Authors>
10-
<TargetFrameworks>netstandard2.0;netcoreapp3.0</TargetFrameworks>
10+
<TargetFrameworks>netstandard2.0;netcoreapp3.0;net6.0</TargetFrameworks>
1111
<AssemblyName>FluentAssertions.AspNetCore.Mvc</AssemblyName>
1212
<PackageId>FluentAssertions.AspNetCore.Mvc</PackageId>
1313
<PackageTags>TDD;Fluent;Mvc;AspNetMvc;aspnetcore;aspnetcoremvc</PackageTags>
@@ -23,15 +23,18 @@
2323
<OutputPath>bin\$(Configuration)\$(TargetFramework)\</OutputPath>
2424
</PropertyGroup>
2525

26-
<ItemGroup>
27-
<PackageReference Include="FluentAssertions" Version="6.0.0" />
28-
</ItemGroup>
26+
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
27+
<PackageReference Include="FluentAssertions" Version="6.6.0" />
28+
<FrameworkReference Include="Microsoft.AspNetCore.App" />
29+
</ItemGroup>
2930

3031
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
32+
<PackageReference Include="FluentAssertions" Version="6.0.0" />
3133
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.1.0" />
3234
</ItemGroup>
3335

3436
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
37+
<PackageReference Include="FluentAssertions" Version="6.0.0" />
3538
<FrameworkReference Include="Microsoft.AspNetCore.App" />
3639
</ItemGroup>
3740

src/FluentAssertions.AspNetCore.Mvc/JsonResultAssertions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public JsonResultAssertions(JsonResult subject) : base(subject)
3030
/// <summary>
3131
/// The <see cref="JsonResult.SerializerSettings"/> on the tested subject.
3232
/// </summary>
33-
#if NETCOREAPP3_0
33+
#if NETCOREAPP3_0_OR_GREATER
3434
public object SerializerSettings => JsonResultSubject.SerializerSettings;
3535
#else
3636
public Newtonsoft.Json.JsonSerializerSettings SerializerSettings => JsonResultSubject.SerializerSettings;

tests/FluentAssertions.AspNetCore.Mvc.Tests/ConvertToActionResultAssertions_Tests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public void BeActionResult_GivenActionResultOfTValue_ShouldReturnActionResultAss
2929

3030
var result = subject.Should().BeActionResult<object>();
3131

32-
result.Should().BeOfType<ActionResultAssertions<object>>();
32+
Assert.IsType<ActionResultAssertions<object>>(result);
3333
}
3434

3535
[Fact]

tests/FluentAssertions.AspNetCore.Mvc.Tests/FluentAssertions.AspNetCore.Mvc.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netcoreapp2.1;netcoreapp3.0</TargetFrameworks>
4+
<TargetFrameworks>netcoreapp2.1;netcoreapp3.0;net6.0</TargetFrameworks>
55

66
<IsPackable>false</IsPackable>
77
</PropertyGroup>

0 commit comments

Comments
 (0)