Skip to content

Commit

Permalink
Target the .NET Standard 2.0 instead of .NET Core 6.0. (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
GillesTourreau authored Oct 13, 2023
1 parent ed344c1 commit f26ce3c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,12 @@ public void Deserialization()
Name = "Gilles TOURREAU",
});
}
```
```

## Library dependencies
- The [PosInformatique.FluentAssertions.Json](https://www.nuget.org/packages/PosInformatique.FluentAssertions.Json/) library
target the .NET Standard 2.0 and can be used with various of .NET architecture (.NET Core, .NET Framework,...).

- The [PosInformatique.FluentAssertions.Json](https://www.nuget.org/packages/PosInformatique.FluentAssertions.Json/) library
use the 4.6.0 version of the [System.Text.Json](https://www.nuget.org/packages/System.Text.Json/) NuGet package
and can be used with old projects that target this library version and earlier.
8 changes: 6 additions & 2 deletions src/FluentAssertions.Json/FluentAssertions.Json.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
Expand All @@ -11,6 +11,9 @@
<PackageProjectUrl>https://github.com/PosInformatique/PosInformatique.FluentAssertions.Json</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageReleaseNotes>
1.0.3
- Target the .NET Standard 2.0 instead of .NET Core 6.0

1.0.2
- Fix the README.md file.

Expand All @@ -24,7 +27,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.0.0" />
<PackageReference Include="FluentAssertions" Version="5.0.0" />
<PackageReference Include="System.Text.Json" Version="4.6.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static void BeJsonSerializableInto(this ObjectAssertions assertions, obje
}
}

var expectedJsonDocument = JsonSerializer.SerializeToDocument(expectedJson, JsonSerializationOptions);
var expectedJsonDocument = JsonDocument.Parse(JsonSerializer.Serialize(expectedJson, JsonSerializationOptions));

Compare(deserializedJsonDocument!, expectedJsonDocument);
}
Expand Down

0 comments on commit f26ce3c

Please sign in to comment.