Skip to content

Conversation

sebastienros
Copy link

@sebastienros sebastienros commented Jan 30, 2024

Some transitive dependencies have vulnerabilities, and this is an attempt to refresh those and upgrade to supported framework versions.

uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'
- uses: actions/checkout@v4
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The base images have net8.0 already installed.

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Central package management such that version are store in a single place.

<copyright>&#169; Microsoft Corporation. All rights reserved.</copyright>
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
<TargetFrameworks>net6.0</TargetFrameworks>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means anything higher is fine (net7.0, net8.0, ...). It matters to target other ones only if we have custom code for it.

<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.1.1" />
<PackageReference Include="Microsoft.Net.Http.Headers" Version="2.1.1" />
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These packages are not published anymore (most). Referencing the shared framework is the way to go.

using System.IO;
using System.Linq;
using System.Text;
using System.Text.Json;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed NewtonSoft.Json dependency.


<PropertyGroup>
<TargetFrameworks>$(StandardTestTfms)</TargetFrameworks>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests are executed on both.

</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Net.Http.WinHttpHandler" Version="4.5.4" />
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed anymore and cross-platform.

@sebastienros
Copy link
Author

@jbjordan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant