Visual Studio, ASP.NET templates, Nuget, bootstap 3 vs 4


Finally, today I found the source of why the default MVC web application fails after upgrading the Nuget packages. This have been a thorn in my side for some months. I use the “ASP.NET Web Application” and “ASP.NET Core Web Application”  alot when I try out things I want to learn new things and use these templates as a starting point.

snip_20180708140550

But this winter these templates started to fail where missing formatting made the test websites ugly and. The root case for this is bootstrap. The template is based on the 3.3.7 and the next step 4.0. If you upgrade the bootstrap nuget package to 4.0 or newert your website will be looking like follows instead of the the standard.

snip_20180708140924

The work-around is not to include the bootstrap 4.0 or newer in your test project until Microsoft has fixed the project template. I just use the “Select all packages” and thereby uncheck the bootstrap and update. Should be safe and things are working as expected.

snip_20180708140218

Off course, you can fix the code yourself, but this is not on my mind at this time 🙂

Bootstrap 4 is amost a complete rewrite and if you need to migrate to bootstrap, please follow the upgrade guide.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s