Conversation
There was a problem hiding this comment.
Pull request overview
This pull request aims to update target frameworks and package references to improve compatibility across different .NET versions. The changes consolidate conditional compilation directives, migrate from PolySharp to Meziantou.Polyfill for polyfills, update package versions, and reorganize package references across projects.
Changes:
- Migrated from PolySharp to Meziantou.Polyfill package and introduced SUPPORTS_ASYNC_DISPOSABLE conditional compilation symbol
- Updated multiple package versions (MassTransit, Microsoft.Extensions.*, Serilog, System.Linq.Async, etc.) to latest versions
- Consolidated conditional compilation directives replacing framework-specific checks with more consistent patterns (SUPPORTS_ASYNC_DISPOSABLE, NETFRAMEWORK)
- Reorganized project dependencies by moving System.Linq.Async and other package references to framework-specific ItemGroups in Kook.Net.Core.csproj
- Replaced Microsoft.AspNetCore.App FrameworkReference with specific PackageReferences in hosting projects
- Reordered target frameworks in common.props
- Added global using directives for System.Net.Http on NETFRAMEWORK targets
- CRITICAL: Introduced C# 13 extension syntax that will prevent compilation
Reviewed changes
Copilot reviewed 43 out of 43 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| props/common.props | Reordered target frameworks, added SUPPORTS_ASYNC_DISPOSABLE symbol, migrated to Meziantou.Polyfill, added System.Net.Http reference for .NET Framework |
| Directory.Packages.props | Updated package versions for MassTransit (with version range), Microsoft.Extensions.*, Serilog, System packages |
| THIRD-PARTY-NOTICES.md | Replaced PolySharp license with Meziantou.Polyfill license |
| src/Kook.Net.Core/Kook.Net.Core.csproj | Reorganized package references into framework-specific ItemGroups |
| src/Kook.Net.Core/Utils/PolyfillUtils.cs | CRITICAL: Attempted to add polyfill using experimental C# 13 extension syntax that won't compile |
| src/Kook.Net.Core/Extensions/CollectionExtensions.cs | CRITICAL: Refactored to use experimental C# 13 extension syntax that won't compile |
| src/Kook.Net.Core/GlobalUsings.cs | Added global using for System.Net.Http on NETFRAMEWORK |
| src/Kook.Net.Rest/Kook.Net.Rest.csproj | Removed duplicate package references (now inherited from Core) |
| src/Kook.Net.Rest/GlobalUsings.cs | Added global using for System.Net.Http on NETFRAMEWORK |
| src/Kook.Net.Rest/BaseKookClient.cs | Minor typo in comment ("any ways" should be "anyway") |
| src/Kook.Net.Rest/KookRestClient.cs | Updated async disposable pattern to use SUPPORTS_ASYNC_DISPOSABLE |
| src/Kook.Net.Rest/KookRestApiClient.cs | Changed conditional from NET462 to NETFRAMEWORK for URL encoding |
| src/Kook.Net.Rest/Net/*.cs | Removed explicit NET462 using directives (now global), updated conditional compilation |
| src/Kook.Net.Rest/Net/Converters/*.cs | Removed conditional compilation for DateTimeOffset.UnixEpoch (now uses polyfill) |
| src/Kook.Net.WebSocket/*.cs | Updated async disposable patterns, removed System.Linq.Async package reference, changed Lock usage |
| src/Kook.Net.Webhook/*.cs | Updated async disposable patterns to use SUPPORTS_ASYNC_DISPOSABLE |
| src/Kook.Net.Hosting/Kook.Net.Hosting.csproj | Replaced FrameworkReference with PackageReference for Microsoft.Extensions.Hosting.Abstractions |
| src/Kook.Net.DependencyInjection.Microsoft/Kook.Net.DependencyInjection.Microsoft.csproj | Commented out FrameworkReference, added PackageReference for Microsoft.Extensions.Options.ConfigurationExtensions |
| src/Kook.Net.Pipe/GlobalUsings.cs, KookPipeClient.cs | Added global using, changed NET462 to NETFRAMEWORK |
| src/Kook.Net.Experimental/GlobalUsings.cs | Added global using for System.Net.Http on NETFRAMEWORK |
| src/Kook.Net.Commands/PrimitiveParsers.cs | Changed NET6_0_OR_GREATER to NET for DateOnly/TimeOnly |
| src/Kook.Net.CardMarkup/CardMarkupSerializer.cs | Updated async disposable pattern |
| test/Kook.Net.Tests.Unit/ModuleBuilderTests.cs | Removed conditional compilation for DateTimeOffset.UnixEpoch test |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| </ItemGroup> | ||
| <ItemGroup Condition="'$(TargetFramework)' == 'net9.0'"> | ||
| <PackageReference Include="System.Linq.Async" /> | ||
| </ItemGroup> |
There was a problem hiding this comment.
The package references have been reorganized to be framework-specific, but there's no ItemGroup for net10.0. Given that net10.0 is in the target frameworks list (line 25 in common.props), net10.0 builds will not get any of these package references. If net10.0 has System.Linq.Async built-in or doesn't need it, this is fine. Otherwise, add an ItemGroup condition for net10.0 or verify that the packages are not needed for this target framework.
| </ItemGroup> | |
| </ItemGroup> | |
| <ItemGroup Condition="'$(TargetFramework)' == 'net10.0'"> | |
| <PackageReference Include="System.Linq.Async" /> | |
| </ItemGroup> |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 43 out of 43 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|




No description provided.