Blazorise icon indicating copy to clipboard operation
Blazorise copied to clipboard

Templates update

Open tesar-tech opened this issue 1 year ago • 7 comments

https://github.com/Megabit/Blazorise/issues/5734#issuecomment-2636863698

tesar-tech avatar Feb 05 '25 17:02 tesar-tech

Do you want to just upgrade the .NET9/8 template so it doesn't use the _Host.cshtml or should I revisit the template as whole? @stsrki

I already see few flaws/possible improvements

  • dotnet new blazorise -n MyNewBlazoriseApp -p Bootstrap5 -bh Server -ut false -f net9.0 --blazorise-datagrid true causes missing client proj in sln.
  • old dotnets are not needed as they are out of support
  • there is no way of upgrading the assets versions other then doing it manually
  • probably many more.

tesar-tech avatar Mar 17 '25 20:03 tesar-tech

For 2.0, we are dropping .NET6/7 so yes, we will also remove _Host.cshtml from the templates and use only new structure with App.razor.

I already see few flaws/possible improvements

  • dotnet new blazorise -n MyNewBlazoriseApp -p Bootstrap5 -bh Server -ut false -f net9.0 --blazorise-datagrid true causes missing client proj in sln.
  • old dotnets are not needed as they are out of support
  • there is no way of upgrading the assets versions other then doing it manually
  • probably many more.

I think this will be solved as soon as we drop .NET6/7 support.

stsrki avatar Mar 18 '25 09:03 stsrki

Can we upgrade the old structure which requires nuget cli to the new with csproj that works with dotnet pack?

tesar-tech avatar Mar 21 '25 19:03 tesar-tech

You can. But I think there was a technical reason why we used nuget cli, and not dotnet.

stsrki avatar Mar 21 '25 20:03 stsrki

Can you expand that technical reason?

tesar-tech avatar Mar 21 '25 21:03 tesar-tech

If I remember correctly, it is because the template projects are not buildable since they contain multiple different Blazorise providers at the same time. And nuget cli just pack them instead of building.

Maybe @David-Moreira remembers it? PS Sorry for pinging you.

stsrki avatar Mar 22 '25 06:03 stsrki

It's ok to ping me. Don't worry.

Yes the projects for the templates don't compile/build by default because they have a bunch of conditional variable placeholders that will change the produced output according to the user chosen options: Image

Actually I don't remember if dotnet pack requires building the project, after all it's just a wrapper for nuget cli. I probably wouldn't bother updating if there's no clear benefit. If I remember correctly nuget.cli was chosen because of familiarity, since it was what we already used to publish blazorise if I'm not wrong, there might have been other reasons but I really don't remember now, so there might be a technical reason that you will discover if you attempt to migrate haha.

David-Moreira avatar Mar 24 '25 09:03 David-Moreira