Skip to content

Upgrade the solution from .NET 6 to .NET 10 - #147

Open
mohab-elshamy wants to merge 4 commits into
developfrom
upgrade-dotnet-10
Open

Upgrade the solution from .NET 6 to .NET 10#147
mohab-elshamy wants to merge 4 commits into
developfrom
upgrade-dotnet-10

Conversation

@mohab-elshamy

Copy link
Copy Markdown
Collaborator

This update helps keep the project aligned with the current .NET ecosystem, since .NET 6 has reached end of support from Microsoft. Moving to .NET 10 also improves compatibility with newer SDKs, tooling, NuGet packages, Docker images, and CI environments.

Includes:

  • Updated project target frameworks and NuGet packages for .NET 10 compatibility.
  • Updated Docker and CI .NET SDK/runtime versions.
  • Adjusted Swagger/OpenAPI setup for newer package APIs.
  • Updated EF Core usage and added a migration for unique indexes on project routes and tag names.
  • Fixed Identity role seed data to avoid noisy migration changes.
  • Verified restore/build/test and confirmed no pending EF model changes.

Note:
Please make sure that the JwtSettings:Secret value is at least 32 characters long. The updated JWT package applies stricter validation for the signing secret, so older short secrets that were previously accepted may need to be updated.

@cengique cengique left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Getting some errors:

$ dotnet run --environment Development
Using launch settings from /.../AnalySim/src/Analysim.Web/Properties/launchSettings.json...
Building...
/usr/share/dotnet/sdk/10.0.110/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(66,5): error NETSDK1226: Prune Package data not found .NETCoreApp 10.0 Microsoft.AspNetCore.App.  To ignore this error, set the AllowMissingPrunePackageData to true.

Tried to clean the environment, but getting another error about missing targets:

$ dotnet clean
  Analysim.Web net10.0 failed with 1 error(s) (0.1s)
    /usr/share/dotnet/sdk/10.0.110/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(266,5): error NETSDK1005: Assets file '/home/cengiz/work/swprojects/AnalySim/src/Analysim.Web/obj/project.assets.json' doesn't have a target for 'net10.0'. Ensure that restore has run and that you have included 'net10.0' in the TargetFrameworks for your project.

Any clues?

@mohab-elshamy

Copy link
Copy Markdown
Collaborator Author

Dr. @cengique , perhaps reinstalling .NET 10 along with the ASP.NET Core targeting pack could help, in case some components are missing or not installed correctly.

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