Skip to content

Commit

Permalink
feat: Add net 7 and make STJ conditional (#283)
Browse files Browse the repository at this point in the history
* #282 Add net 5 and make STJ conditional

Signed-off-by: James Thompson <[email protected]>

* Fix the multi targetting and extended it to another package

Signed-off-by: James Thompson <[email protected]>

* Switch to net 7 from net 5

Signed-off-by: James Thompson <[email protected]>

---------

Signed-off-by: James Thompson <[email protected]>
  • Loading branch information
thompson-tomo authored Sep 14, 2024
1 parent 56bf356 commit 48c27d0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/CycloneDX.Core/CycloneDX.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks>netstandard2.0;net7.0</TargetFrameworks>
<Product>CycloneDX.Core</Product>
<Description>A .NET Standard library for CycloneDX bill-of-material documents.</Description>
<PackageId>CycloneDX.Core</PackageId>
Expand All @@ -15,9 +15,13 @@
<PackageReference Include="JsonSchema.Net" Version="5.3.1" />
<PackageReference Include="protobuf-net" Version="3.2.26" />
<PackageReference Include="protobuf-net.BuildTools" Version="3.2.12" PrivateAssets="all" IncludeAssets="runtime;build;native;contentfiles;analyzers;buildtransitive" />
</ItemGroup>

<!--The below packages are natively provided by the framework hence are not need for the frameworks which they are included in. What is included can be checked via https://apisof.net/-->
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="System.Text.Json" Version="8.0.4" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="Schemas\*" />
</ItemGroup>
Expand Down
6 changes: 5 additions & 1 deletion src/CycloneDX.Spdx/CycloneDX.Spdx.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks>netstandard2.0;net7.0</TargetFrameworks>
<Product>CycloneDX.Spdx</Product>
<Description>A .NET Standard library for SPDX documents.</Description>
<PackageId>CycloneDX.Spdx</PackageId>
Expand All @@ -13,6 +13,10 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="JsonSchema.Net" Version="5.3.1" />
</ItemGroup>

<!--The below packages are natively provided by the framework hence are not need for the frameworks which they are included in. What is included can be checked via https://apisof.net/-->
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="System.Text.Json" Version="8.0.4" />
</ItemGroup>

Expand Down

0 comments on commit 48c27d0

Please sign in to comment.