Skip to content

Update NuGet packages and fix build warnings#73

Merged
GlenConway merged 1 commit into
devfrom
chore/update-nuget-fix-warnings
Feb 19, 2026
Merged

Update NuGet packages and fix build warnings#73
GlenConway merged 1 commit into
devfrom
chore/update-nuget-fix-warnings

Conversation

@GlenConway

Copy link
Copy Markdown
Owner

Update various NuGet packages to their latest versions and resolve build warnings related to the Swagger configuration.

Copilot AI review requested due to automatic review settings February 19, 2026 12:16
@GlenConway GlenConway merged commit b6a862f into dev Feb 19, 2026
7 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR attempts to update NuGet packages to newer versions and fix Swagger-related build warnings. However, the changes introduce multiple critical compilation errors due to incorrect API usage and potentially non-existent package versions.

Changes:

  • Update Radzen.Blazor from 9.0.4 to 9.0.5 (minor update, low risk)
  • Update Microsoft.AspNetCore.TestHost from 10.0.2 to 10.0.3 (patch update, low risk)
  • Update Microsoft.SemanticKernel from 1.20.1 to 1.71.0 (suspicious version jump)
  • Update Swashbuckle.AspNetCore from 7.3.2 to 10.1.4 (major version jump with breaking changes)
  • Modify ConfigureSwaggerOptions.cs to adapt to new Swagger API (contains critical errors)

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/ResidencyRoll.Web/ResidencyRoll.Web.csproj Minor version update to Radzen.Blazor UI component library
src/ResidencyRoll.Tests/ResidencyRoll.Tests.csproj Patch version update to ASP.NET Core test hosting package
src/ResidencyRoll.Api/ResidencyRoll.Api.csproj Major version updates to Semantic Kernel and Swashbuckle packages with potential compatibility issues
src/ResidencyRoll.Api/Configuration/ConfigureSwaggerOptions.cs Attempted migration to new Swagger API, but contains incorrect namespace and non-existent API usage

using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi;

Copilot AI Feb 19, 2026

Copy link

Choose a reason for hiding this comment

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

The namespace change from Microsoft.OpenApi.Models to Microsoft.OpenApi is incorrect. The types used in this file (OpenApiInfo, OpenApiSecurityScheme, SecuritySchemeType, ParameterLocation, OpenApiSecurityRequirement) are located in the Microsoft.OpenApi.Models namespace, not the root Microsoft.OpenApi namespace. This will cause compilation errors. The using statement should be using Microsoft.OpenApi.Models; to maintain access to these types.

Suggested change
using Microsoft.OpenApi;
using Microsoft.OpenApi.Models;

Copilot uses AI. Check for mistakes.
Comment on lines +39 to 45
options.AddSecurityRequirement(document => new OpenApiSecurityRequirement
{
{
new OpenApiSecurityScheme
{
Reference = new OpenApiReference
{
Type = ReferenceType.SecurityScheme,
Id = "Bearer"
}
},
Array.Empty<string>()
new OpenApiSecuritySchemeReference("Bearer", document, null),
new List<string>()
}
});

Copilot AI Feb 19, 2026

Copy link

Choose a reason for hiding this comment

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

The AddSecurityRequirement method signature has been changed to accept a lambda function with a document parameter, but this API is not standard for Swashbuckle.AspNetCore. The typical AddSecurityRequirement method accepts an OpenApiSecurityRequirement instance directly, not a factory function. This change appears to be using a non-existent API and will cause compilation errors. The correct approach is to use the original pattern: create the OpenApiSecurityRequirement object with a proper OpenApiSecurityScheme reference.

Copilot uses AI. Check for mistakes.
}
},
Array.Empty<string>()
new OpenApiSecuritySchemeReference("Bearer", document, null),

Copilot AI Feb 19, 2026

Copy link

Choose a reason for hiding this comment

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

The OpenApiSecuritySchemeReference type does not exist in the Microsoft.OpenApi.Models namespace. The correct approach when updating to Swashbuckle.AspNetCore 10.x is to use an OpenApiSecurityScheme with a Reference property pointing to an OpenApiReference object. The constructor call with three parameters (id, document, null) does not match any known API in the OpenAPI or Swashbuckle libraries.

Copilot uses AI. Check for mistakes.
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.

2 participants