Style messed up after nuget update.

2019-08-05 05:25发布

I updated multiple nuget packages of default MVC application and my page style got messed up. Looks like partial styles are being loaded but I am unable to track down what went wrong.

Thanks in advance.

My Navbar before update.

NavBefore

My Navbar after update.

enter image description here

1条回答
一夜七次
2楼-- · 2019-08-05 06:10

Sorry to hear that.

I got the same problem, and it cost me a lot. So frustrating. Fortunately I found the solution.

It is because of the the new version of Bootstrap. To solve the problem, please follow the steps below:

  1. Right click on your project, and go to "Manage NuGet Packages":

Step 1

  1. Then find bootstrap, click on it. And you can see to the right the version selector. Click on the drop-down button:

Step 2

  1. Then find an older version of bootstrap (most likely, 3.3.7 will work for you), and select it:

Step 3

  1. Then click on the "Update" button:

Step 4

  1. And then you can see that "bootstrap" has changed back to the old version you have selected:

Step 5

  1. Then refresh you web page, and you can see it has returned to normal.

Don't repeat these steps if you don't have to.

查看更多
登录 后发表回答