asp.net-mvcrazorbootstrap-5visual-studio-2022pageload

Bootstrap script locking up page


After a while, so I don't know what starts this off, my browser will have the following problem with my net 3.1 MVC site while in Visual Studio 2022 (debug or release), I switched from Chrome to Edge and it worked for a bit, but the same error appeared later,

I just tried it in FireFox and it is working there currently

I reset the settings in Edge and that did nothing

On the deployed version it is working just fine, even in the same browser

If I roll back to pervious versions of my site that never had this problem before, the error is still there

Error:

When I try to load

<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script> 

on a razor page it locks the page in an infinite loading loop(it loads everything before the script is called), never failing but locking up the page and I cannot access the Dev Tools for the webpage

I almost don't know where to begin trying to debug this problem

I have removed this script line and everything else loads just fine

I have removed the base files, and as you would expect it cannot find the files to reference and logs the failure to the Dev console, but the page loads.

I have updated to the latest bootstrap version

I updated to the latest visual studio 2022 version

I have tried to only load the script and it locks up

I'm going to start rolling back versions of visual studio now, just want to get this out here.


Solution

  • I've had the exact same issue as you today, the only difference was my project is a .net 6 application.

    I was also on version 17.5.1 of Visual Studio. Version 17.5.2 is now available and after upgrading to this, this fixed the issue for me. Hope it does for you too!