Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Templates to .NET 9 & MudBlazor v8 #482

Merged
merged 17 commits into from
Jan 18, 2025

Conversation

jperson2000
Copy link
Contributor

@jperson2000 jperson2000 commented Nov 15, 2024

Description

Resolves: #481

This update upgrades MudBlazor templates to match the latest ASP.NET Core Blazor Project templates. Changes include a reduced amount of code for auth pages, a better way to detect render modes, and an upgrade to .NET 9. Overall, however, files are largely the same.

Changes were made by performing the following steps:

  1. Cloning the MudBlazor.Templates repo (clone link)
  2. Cloning the aspnetcore repo (clone link)
  3. Choose the net9 branch in aspnetcore
  4. Comparing the MudBlazor Templates folder against aspnetcore\src\ProjectTemplates\Web.ProjectTemplates\content\BlazorWeb-CSharp\BlazorWeb-CSharp in BeyondCompare and setting the local code folders via Set Base Folders
  5. Performing file-by-file comparisons and looking for changes apart from using MudBlazor components.

Special thanks once again to @Anu6is for the MudBlazor.Static library for the Account Management pages.

Using BeyondCompare to Update Templates

image

How Has This Been Tested?

This was tested by:

  1. Running .\InstallAndBuildAllTemplates.ps1 PowerShell script
  2. Observing that all builds succeeded
  3. Opening each solution and testing all links
Project Type Test Result
InteractivityAuto Successful (11/15/2024)
InteractivityAuto_AllInteractive Successful (11/15/2024)
InteractivityAuto_AllInteractive_Auth Successful (11/15/2024)
InteractivityAuto_Auth Successful (11/15/2024)
InteractivityAuto_UseMain Successful (11/15/2024)
InteractivityNone Successful (11/15/2024)
InteractivityServer Successful (11/15/2024)
InteractivityServer_AllInteractive Successful (11/15/2024)
InteractivityWebAssembly Successful (11/15/2024)
InteractivityWebAssembly_AllInteractive Successful (11/15/2024)

Type of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (fix or improvement to the website or code docs)

Checklist

  • The PR is submitted to the correct branch (dev).
  • My code follows the code style of this project.
  • I've added relevant tests.

src/mudblazor/.template.config/template.json Outdated Show resolved Hide resolved
src/mudblazor/.template.config/template.json Outdated Show resolved Hide resolved
src/mudblazor/.template.config/template.json Outdated Show resolved Hide resolved
@jperson2000 jperson2000 changed the title Upgraded MudBlazor Templates to .NET 9 Upgraded MudBlazor Templates to .NET 10 Nov 15, 2024
@ScarletKuro
Copy link
Member

Was a little mistake to give the main branch instead of the tag 9.0, it seems the main is on two commits a head, but luckily it seems only the tempalate.json is different with the net.10, so here is the correct one for .net9.
https://github.com/dotnet/aspnetcore/blob/v9.0.0/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/template.json

@ScarletKuro
Copy link
Member

The rest seems to be the same

@jperson2000
Copy link
Contributor Author

Was a little mistake to give the main branch instead of the tag 9.0, it seems the main is on two commits a head, but luckily it seems only the tempalate.json is different with the net.10, so here is the correct one for .net9. https://github.com/dotnet/aspnetcore/blob/v9.0.0/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/template.json

You're totally right! That's a relief that only the template is different; I will get that sync'ed today then.

@jperson2000 jperson2000 changed the title Upgraded MudBlazor Templates to .NET 10 Upgraded MudBlazor Templates to .NET 9 Nov 15, 2024
@ScarletKuro
Copy link
Member

I added net9 to the build system, feel free to update the branch

@ScarletKuro
Copy link
Member

ScarletKuro commented Nov 15, 2024

Somehow it still fails to build in CI, tho it's fine locally via the nuke-build. Not sure why it still thinks net8 is installed. I will look at it tmr, too tired for it today.

@jperson2000 jperson2000 marked this pull request as ready for review November 15, 2024 17:16
@jperson2000
Copy link
Contributor Author

Ok, I've finished testing all template projects and have verified that the new auth in .NET 9 is working as expected. I've restored the original Welcome message, and I think we're in good shape to review!

@ScarletKuro
Copy link
Member

I will review and test this on weekends. I'm also guessing that we will merge this once the v8 is out?

@omidkrad
Copy link

Thanks for the update. Can you please also enable it to install with the dotnet new install MudBlazor.Templates command? Also README.md needs to be updated to show .NET 9.

@mjacob2
Copy link

mjacob2 commented Jan 8, 2025

Hi guys! May I ask, what is the approximate time to merge?

@jkears
Copy link

jkears commented Jan 17, 2025

When will you be publishing the .net9 template?

@ScarletKuro
Copy link
Member

ScarletKuro commented Jan 17, 2025

When will you be publishing the .net9 template?

As I said, when MudBlazor v8 will be released (this month), they will be bundled together.

@jkears
Copy link

jkears commented Jan 17, 2025

@ScarletKuro thank you for that clarification.
When you say this month, does that mean within the next 2 weeks? I am not trying to be pushy, I just need to be able to communicate our schedule with our team. We have used Mud Blazor for several years now and absolutely love it, so looking forward to getting V8 ASAP (which I am certain, most others are as eager as well). Thank you for all of your efforts, its an amazing UI library!

@henon
Copy link
Collaborator

henon commented Jan 17, 2025

When you say this month, does that mean within the next 2 weeks?

Yes, exactly.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@ScarletKuro
Copy link
Member

V8 is out, but it will some time to roll out the template, as we depend on external dependency Extensions.MudBlazor.StaticInput that needs to be updated.

@ScarletKuro ScarletKuro changed the title Upgraded MudBlazor Templates to .NET 9 Upgrade MudBlazor.Templates to .NET 9 & MudBlazor v8 Jan 18, 2025
@ScarletKuro ScarletKuro changed the title Upgrade MudBlazor.Templates to .NET 9 & MudBlazor v8 Upgrade Templates to .NET 9 & MudBlazor v8 Jan 18, 2025
@ScarletKuro ScarletKuro merged commit 9d99e90 into MudBlazor:dev Jan 18, 2025
6 checks passed
@ScarletKuro
Copy link
Member

New templates are out

dotnet new install MudBlazor.Templates::3.0.0

In future there will further improvements to that template, for example @Anu6is has some solution for the drawer in static SSR.

@saddamhossain
Copy link

saddamhossain commented Jan 20, 2025

dotnet new install MudBlazor.Templates::3.0.0

Its awesome. Thanks a lot!!!

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.

.NET 9 Templates release date?
8 participants