Conversation
|
Fixed in commit 843911b. Updated all 4 Chapter 3 workflow files to use .NET 10.0.x:
Build and tests verified for Fitnet.Common (4/4 tests passing). |
Co-authored-by: kamilbaczek <74410956+kamilbaczek@users.noreply.github.com>
Co-authored-by: kamilbaczek <74410956+kamilbaczek@users.noreply.github.com>
843911b to
3b50eb7
Compare
|
@copilot fix error /home/runner/work/evolutionary-architecture-by-example/evolutionary-architecture-by-example/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.Infrastructure/Fitnet.Contracts.Infrastructure.csproj : error NU1510: Warning As Error: PackageReference Microsoft.AspNetCore.Http.Abstractions will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary. [/home/runner/work/evolutionary-architecture-by-example/evolutionary-architecture-by-example/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.slnx] |
…ence Fixes NU1510 error in Fitnet.Contracts.Infrastructure project. The package is already included via FrameworkReference to Microsoft.AspNetCore.App. Co-authored-by: kamilbaczek <74410956+kamilbaczek@users.noreply.github.com>
Fixed in commit 612b70b. Removed the redundant Microsoft.AspNetCore.Http.Abstractions package reference from Fitnet.Contracts.Infrastructure.csproj. The package is already included via FrameworkReference to Microsoft.AspNetCore.App, which caused the NU1510 error in .NET 10. |
|
@copilot fix Error: /home/runner/work/evolutionary-architecture-by-example/evolutionary-architecture-by-example/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.Infrastructure/Database/Migrations/20230601184153_MakeSignedAtColumnNullable.cs(4,1): error IDE0055: Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055) [/home/runner/work/evolutionary-architecture-by-example/evolutionary-architecture-by-example/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.Infrastructure/Fitnet.Contracts.Infrastructure.csproj] |
Add missing blank line between namespace declaration and using statements in three migration files to comply with C# formatting rules. Co-authored-by: kamilbaczek <74410956+kamilbaczek@users.noreply.github.com>
Add using System.Diagnostics.CodeAnalysis to migration files that use [ExcludeFromCodeCoverage] attribute. Co-authored-by: kamilbaczek <74410956+kamilbaczek@users.noreply.github.com>
Fixed in commits 213c187 and ef88f80. Added missing blank line between namespace declaration and using statements, and added the missing
|
|
Error: /home/runner/work/evolutionary-architecture-by-example/evolutionary-architecture-by-example/Chapter-3-microservice-extraction/Fitnet/Src/Offers/Fitnet.Offers.DataAccess/Database/Migrations/20230503180337_CreateOffersTable.cs(4,1): error IDE0055: Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055) [/home/runner/work/evolutionary-architecture-by-example/evolutionary-architecture-by-example/Chapter-3-microservice-extraction/Fitnet/Src/Offers/Fitnet.Offers.DataAccess/Fitnet.Offers.DataAccess.csproj] Build FAILED. Error: /home/runner/work/evolutionary-architecture-by-example/evolutionary-architecture-by-example/Chapter-3-microservice-extraction/Fitnet/Src/Offers/Fitnet.Offers.DataAccess/Database/Migrations/20230503180337_CreateOffersTable.cs(4,1): error IDE0055: Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055) [/home/runner/work/evolutionary-architecture-by-example/evolutionary-architecture-by-example/Chapter-3-microservice-extraction/Fitnet/Src/Offers/Fitnet.Offers.DataAccess/Fitnet.Offers.DataAccess.csproj] |
Add missing blank lines between namespace declarations and using statements, and add missing using System.Diagnostics.CodeAnalysis for ExcludeFromCodeCoverage attribute in three migration files. Co-authored-by: kamilbaczek <74410956+kamilbaczek@users.noreply.github.com>
Fixed in commit 982bc39. Added missing blank lines between namespace declarations and using statements, and added the missing
|
|
@copilot Error: /home/runner/work/evolutionary-architecture-by-example/evolutionary-architecture-by-example/Chapter-3-microservice-extraction/Fitnet/Src/Passes/Fitnet.Passes.DataAccess/Database/Migrations/20250927073029_AddMissingForeignKeys.cs(9,1): error CS1587: XML comment is not placed on a valid language element [/home/runner/work/evolutionary-architecture-by-example/evolutionary-architecture-by-example/Chapter-3-microservice-extraction/Fitnet/Src/Passes/Fitnet.Passes.DataAccess/Fitnet.Passes.DataAccess.csproj] |
XML comment must be placed directly before the class declaration or before attributes. Moved /// <inheritdoc /> comment before [ExcludeFromCodeCoverage] attribute. Co-authored-by: kamilbaczek <74410956+kamilbaczek@users.noreply.github.com>
Fixed in commit 1cd1aff. Moved the XML comment |
📋 Description
Upgrades Chapter 3 (microservice extraction) projects from .NET 9 to .NET 10. This includes framework target updates, package version bumps, replacement of deprecated API methods, CI/CD pipeline updates, and build error fixes.
Framework & Package Updates
net9.0→net10.0in all Directory.Build.props filesAPI Deprecation Fixes
Replaced deprecated
WithOpenApi()method withWithSummary()andWithDescription()in all endpoint definitions:CI/CD Pipeline Updates
Updated all GitHub Actions workflow files to use .NET 10.0.x SDK:
chapter-3-workflow.ymlchapter-3-contracts-workflow.ymlchapter-3-package-workflow.ymlchapter-3-contracts-package-workflow.ymlBuild Error Fixes
NU1510 Error: Fixed by removing redundant
Microsoft.AspNetCore.Http.Abstractionspackage reference fromFitnet.Contracts.Infrastructure.csproj. The package is already included viaFrameworkReferencetoMicrosoft.AspNetCore.App. In .NET 10 withTreatWarningsAsErrorsenabled, redundant package references are treated as errors.IDE0055 Formatting Errors: Fixed formatting issues in six migration files by:
using System.Diagnostics.CodeAnalysis;statement for the[ExcludeFromCodeCoverage]attributeAffected migration files in Fitnet.Contracts:
20230601184153_MakeSignedAtColumnNullable.cs20230601184328_AddCustomerIdColumn.cs20230624171216_ContractsAddColumnsToSupportContractExpiration.csAffected migration files in Fitnet:
20230503180337_CreateOffersTable.cs20230503180338_CreatePassesTable.cs20250927073029_AddMissingForeignKeys.csCS1587 Error: Fixed XML documentation comment placement in
20250927073029_AddMissingForeignKeys.csby moving the/// <inheritdoc />comment before the[ExcludeFromCodeCoverage]attribute. XML comments must be placed before all attributes on a class declaration.Affected Projects
Note: Fitnet.Contracts and Fitnet depend on published NuGet packages from Fitnet.Common. Full build verification requires updated packages in GitHub Package Registry.
📦 PR Includes
🚫 PR Does Not Include
💡 Additional Notes
All changes follow the .NET 10 upgrade pattern established in PR #228 for Chapter 1. The
WithOpenApi()deprecation is framework-wide in .NET 10, requiring the use of separateWithSummary()andWithDescription()methods for OpenAPI metadata.The NU1510 error fix addresses a .NET 10 behavior change where package references that are already included in framework references are now treated as errors when
TreatWarningsAsErrorsis enabled.The IDE0055 formatting fixes ensure compliance with the project's .editorconfig rules (
csharp_using_directive_placement = inside_namespace) by properly formatting migration files with appropriate spacing and required using statements.The CS1587 error fix ensures XML documentation comments are properly placed before attributes, following C# language rules.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.