How To Upgrade Bootstrap in ASP.NET Core Web Applications - Blazor, MVC, Razor Pages, etc.

  Рет қаралды 16,384

IAmTimCorey

IAmTimCorey

11 ай бұрын

All ASP.NET Core web apps come with Bootstrap 5 built-in. However, it is not set up to upgrade using npm or NuGet. So let's look at how to upgrade to the latest Bootstrap 5 version in MVC, Razor Pages, Blazor Server, and Blazor WebAssembly. We will even look at how to fix an upgrade issue.
Full Training Courses: IAmTimCorey.com
Mailing List: signup.iamtimcorey.com/

Пікірлер: 39
@UweGrimm
@UweGrimm 11 ай бұрын
Thanks a lot for all your videos and help.
@IAmTimCorey
@IAmTimCorey 11 ай бұрын
You are welcome!
@joannagechanfon4770
@joannagechanfon4770 10 ай бұрын
I love all your lesson, you are the best teacher ever ❤
@IAmTimCorey
@IAmTimCorey 10 ай бұрын
I am glad it was helpful.
@karwenzman
@karwenzman 2 ай бұрын
Thanks! I am learning so much! Newbies like me: if you dont see any effect after implementing these changes try to clear the browser's cache (Strg+F5); that did help me on my Wasm project (17:00).
@IAmTimCorey
@IAmTimCorey 2 ай бұрын
Thanks for sharing!
@emreibrahim8504
@emreibrahim8504 3 ай бұрын
Thank you alot Tim!
@IAmTimCorey
@IAmTimCorey 3 ай бұрын
You are welcome.
@starkillermx
@starkillermx Ай бұрын
Thanks for your video!. How to fix the navbar problem to switch to dark mode? many thanks!
@kvelez
@kvelez 2 ай бұрын
Thanks, you should cover those topics for the projects now available in .NET8 and also .NET9
@IAmTimCorey
@IAmTimCorey 2 ай бұрын
.NET 9 isn't out yet and won't be until November 2024. Until then, there will be a lot of changes to how things work, so showing it off early won't be helpful. The principles here apply to the new Blazor Web App project type. The other project types are the same in .NET 8.
@kvelez
@kvelez 2 ай бұрын
@@IAmTimCorey I comprehend, thanks for the clarification. Then still excited for .NET9 and when your courses arrive. Blessings.
@jessedv5915
@jessedv5915 Күн бұрын
Hey i'm learning about Libman and was woundering why you didn't update the versions that was as its also pretty easy, It would be nice to get a video to see if those changes will also be needed
@IAmTimCorey
@IAmTimCorey 12 сағат бұрын
I've stayed away from LibMan here for a couple of reasons. First, we don't need to add another dependency (even if it is a build-time dependency) to handle one CDN link. Second, I'm wary of starting to depend on LibMan. It is a Microsoft-specific thing that is trying to work in the CSS/JavaScript space. I don't trust that it will stick around and I don't want to depend on it when I have projects outside of the .NET space.
@alsa91
@alsa91 11 ай бұрын
Thx Tim, will u make a .Net maui course anytime soon? 😊
@IAmTimCorey
@IAmTimCorey 11 ай бұрын
I’ve been waiting until after .NET 8, since that will stabilize a lot of MAUI.
@usmanfarooq3071
@usmanfarooq3071 11 ай бұрын
If we have many pages in our website and we have used bootstrap everywhere. And bootstrap plans to change the many of its class names then what will happen? Is there a way to handle such kind of broad change?
@IAmTimCorey
@IAmTimCorey 11 ай бұрын
Broad, breaking changes don't typically happen with minor versions of any package. This is true for Bootstrap as well. They keep the big breaking changes for the major version updates. So updating inside of Bootstrap 5 should be mostly fine, just small little tweaks. However, you will need to do more work to upgrade to Bootstrap 6 (probably). In that case, you need to evaluate how much work it is and if it is worth it. You don't have to upgrade. If there are major breaking changes for you, you might stay on the older version.
@317Miss
@317Miss 7 ай бұрын
I'm surprised there's not a tool in visual studio that will automatically replace the files, similar to the package manager (where bootstrap can also be found).
@IAmTimCorey
@IAmTimCorey 7 ай бұрын
There is. You can use npm inside of Visual Studio. I’m not a big fan, because of everything else it adds though. Also, you need to be careful of automatic updates to dependencies.
@Sysshad
@Sysshad 5 ай бұрын
Thanks Tim, good video Do you have a tutorial also for .NET Core 8 and default Blazor Web App. Seems tricky Any reason you dont att it as a Nuget ? i thought that was the best way to keep things up to date
@IAmTimCorey
@IAmTimCorey 5 ай бұрын
How to upgrade Bootstrap in the new Blazor Web App? It will be the same mechanism. As for why I don't use NuGet, it is because that's not the web standard way of getting web dependencies. Plus, I can use a CDN, which means that the user has to download less from me and less in general if they already have a cached version (which is likely).
@Sysshad
@Sysshad 5 ай бұрын
@@IAmTimCorey thanks for reply. Good points
@amdamd-od3hw
@amdamd-od3hw Ай бұрын
i am in a pickle i try to upgrade bootstrap to the get bootstrap 5.3.3 in my blazor web app server side rendering but when i test the accordion component the expanding and deflating of items doesnt work. help?
@IAmTimCorey
@IAmTimCorey Ай бұрын
If you are switching from version 4.x or below, you might want to go back. Upgrading major versions is hard if you aren’t prepared for the work. In general, though, go to Bootstrap’s site and compare how they do the accordion compared to how you are doing it. It may be that they changed the class names or how the structure is laid out.
@dmitrybelov5703
@dmitrybelov5703 11 ай бұрын
Yet another theme - using client library manager to setup bootstrap in local dirs.
@IAmTimCorey
@IAmTimCorey 11 ай бұрын
Yeah, you could, but I'm not a fan. Why add all of that overhead to self-host a file that you could serve faster from a CDN? Plus, why deal with the client library manager if you don't already have to? CDNs allow the users to use a cached version of Bootstrap if they have visited any other site that also used that CDN version, not just my site. That's not true if you self-host.
@SWWTech.
@SWWTech. 11 ай бұрын
Can you do a video on signalr authentication to a blazor server. Preferably using a Maui app.
@IAmTimCorey
@IAmTimCorey 11 ай бұрын
Thanks for the suggestion. Please add it to the list on the suggestion site so others can vote on it as well: suggestions.iamtimcorey.com/
@FcoGalaz
@FcoGalaz 3 ай бұрын
how would you do this in VSCode?
@IAmTimCorey
@IAmTimCorey 3 ай бұрын
The code doesn't change from Visual Studio to VS Code, so what is it that is causing you issues?
@piotr6078
@piotr6078 8 ай бұрын
What about replacing css and js files in our catalogs, huh?
@IAmTimCorey
@IAmTimCorey 8 ай бұрын
I'm not sure what you are asking.
@OnufrievS
@OnufrievS 2 ай бұрын
So a 24 minute video on how to copy two links and lose all the ability to edit the bootstrap.css in any way that makes sense.... this feels like it pretty much defeats the point of updating bootstrap at all
@IAmTimCorey
@IAmTimCorey 2 ай бұрын
First, the Bootstrap file in the template is not one that can be modified either (it is the minified css version). Second, in general you don't want to modify the Bootstrap file. You want to override it with your own CSS. That way, you can upgrade the Bootstrap file (minor and patch versions) without breaking your changes. That's how Bootstrap and similar are designed to be used. If you really want to "modify" Bootstrap, you will want to install the SCSS files and then rebuild the resulting CSS file to include the custom SCSS files you added that override the base files provided by Bootstrap. That's a more involved process and one that only needs to be done by someone VERY familiar with SCSS and CSS (someone who didn't need this video). One of the reason why you want to avoid updating the Bootstrap file is because doing so negates one of the benefits of using a standard file, which is one a user downloads Bootstrap once, they don't have to download it again for another site that uses it. That can be a significant performance increase for your users. Using a non-standard file means that your users will always have to download your file the first time they hit your site (and every time you update that file). Further, you can use a CDN to provide that standard Bootstrap file, further ensuring that your users can gain the benefit of caching and offloading the work of downloading that file to the CDN instead of your server. Finally, the CDN also gzips the file to ensure that the file is the smallest possible when transmitting it to the user. This is what we did in this video.
@davidardo4466
@davidardo4466 11 ай бұрын
How i can subscription ??
@IAmTimCorey
@IAmTimCorey 11 ай бұрын
If you are asking about subscribing to my paid content, you can subscribe to the All Access Pass: www.iamtimcorey.com/allaccesspass/ Note that the monthly version only opens up a few times per year (usually 3 times). The good news is that the monthly version is going to open up on Monday for one week only.
Brutally honest advice for new .NET Web Developers
7:19
Ed Andersen
Рет қаралды 86 М.
How Many Balloons Does It Take To Fly?
00:18
MrBeast
Рет қаралды 129 МЛН
I CAN’T BELIEVE I LOST 😱
00:46
Topper Guild
Рет қаралды 118 МЛН
БОЛЬШОЙ ПЕТУШОК #shorts
00:21
Паша Осадчий
Рет қаралды 10 МЛН
تجربة أغرب توصيلة شحن ضد القطع تماما
00:56
صدام العزي
Рет қаралды 53 МЛН
What is the Future of Blazor? Should I Learn Blazor?
22:32
IAmTimCorey
Рет қаралды 55 М.
Expert Explains the Hidden Crowd Engineering Behind Event Venues | WSJ Pro Perfected
6:49
Liskov: The Liskov Substitution Principle
4:23
Turing Awardee Clips
Рет қаралды 19 М.
Intro to Bootstrap in ASP.NET MVC
1:18:47
IAmTimCorey
Рет қаралды 132 М.
Bootstrap 5 & Blazor | Getting Started
14:00
Kishor Tiwari
Рет қаралды 14 М.
Cool Tech You’ll LOVE!
21:41
Snazzy Labs
Рет қаралды 67 М.
Bootstrap 5 VS MudBlazor
26:01
Just Blazor Programming
Рет қаралды 11 М.
Don't throw exceptions in C#. Do this instead
18:13
Nick Chapsas
Рет қаралды 253 М.
How Many Balloons Does It Take To Fly?
00:18
MrBeast
Рет қаралды 129 МЛН