This entry has been published on 2017-02-06 and may be out of date.
Last Updated on 2017-02-06.
[:en]Be careful with the usage of Bower in those VS versions in ASP.NET Core MVC web applications. It is a useful tool, but seems not to be fully reliable at the moment.
Examples:
- Bootstrap v3.3.7 suddenly asks for tether (tether.io). When you look at the Bootstrap JS file, you might see v4 alpha comments in the code, even if Bower shows it as 3.3.7.
- Similar issue e.g. with jquery 2.2.0 -> 3.1.1
- The version option chooser in the Bower packet management seems to have no effect, and also the Prerelease option.
- Bootstrap layout, e.g. the navbar, is suddenly invisible or destroyed
Workaround
This one worked for me (tested in VS 2017 RC but should also work for 2015u3):
- bower.json: Make sure the version numbers are correct
- Close Visual Studio
- delete %LOCALAPPDATA%\bower folder
- delete content of [yourproject]\wwwroot\lib
- Re-Open your project with Visual Studio
- Right-click on bower dependencies -> restore
- Versions should be correct now
Reference[:]