Visual studio 2022 bootstrap 5

I installed bootstrap sass in Visual Studio 2022 but it is not included in the project

asked Jan 10 at 12:30

2

I have the same issue. Using NuGet was recommended by Bootstrap: //getbootstrap.com/docs/5.1/getting-started/download/

Those files in the explorer are links to the actual files which can be found in C:\Users\< user >\.nuget\packages\bootstrap\5.1.3\contentFiles\any\any\wwwroot\css\ and \js\

However, they are not visible in the project wwwroot directory and I get a 404 error.

I ended up just skipping this all together and using the CDN method.

answered Feb 2 at 17:42

1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

TanvirArjel opened this issue

Oct 28, 2021

· 21 comments

Labels

bug

Something isn't working

Comments

IntelliSense for bootstrap 4.x works fine in Razor Editor in Visual Studio 2022 but does not work for bootstrap 5.x. This issue is persisting from Visual Studio 2022 Preview 1 and now it is prevew7 but still persisting.

@TanvirArjel thanks for contacting us.

This is not an ASP.NET Core specific issue. In order for you to get a better and faster answer we suggest you file this issue via the report a problem dialog in visual studio as described here.

@TanvirArjel I found edit javascript snippet is not formating within razor page[.cshtml], this problem has never been solved.
The temporary solution is to modify the following configuration

@neozhu we are still working on resolving JavaScript formatting for 17.1 😄. You haven't been forgotten!

@ToddGrun @jimmylewis is Bootstrap 5.x support lacking expected?

@NTaylorMullen I'm using 17.1 Preview 2 and CSS intellisense is not working at all now!

@alexgav made more fixes to this scenario coming in Preview 3.

@TanvirArjel I found edit javascript snippet is not formating within razor page[.cshtml], this problem has never been solved. The temporary solution is to modify the following configuration

Thank you so much... Now I can right-click on the document and Format and Unmin etc. It been driving me nuts doing it manually.

Why were these functions removed in the newer versions? I regret updating to vs2022 and .net 6.

@TanvirArjel - do you mean IntelliSense in CSS files themselves or class name completion in Razor files [e.g.

? Would it be possible for you to share a sample project that reproes the issue and detailed repro steps? Thanks!

@alexgav Class name completion in Razor files [e.g.

].

@TanvirArjel - do you have a small project [or any project] you could share that reproduces that? That would really help us investigate.

Also, does it happen immediately after starting VS, or does it start happening after using VS and working on the project for a while [especially adding/deleting files]?

CSS intelliSense has never worked for me in VS 2022. @neozhu thanks for the tip, changing to the Legacy Razor editor fixed the intellisense issue as well brought back some of the other features that are inexplicably missing from the 2022 version.

@alexgav Class name completion in Razor files [e.g.

].

I have exactly the same issue. I updated to Preview 5, it didn't fix it. But what @neozhu described resolves it.

Same with mine projects, whole VS2022 drives me nuts. At least legacy editor fixed Razor pages issue.

Thanks!

Same problem in a simple project MVC on vs2022.
I resolved with what is indicated by @neozhu. Thanks

@TanvirArjel I found edit javascript snippet is not formating within razor page[.cshtml], this problem has never been solved. The temporary solution is to modify the following configuration

resolving JavaScript formatting for 17.1 😄. You haven't been forgotten!

@ToddGrun @jimmylewis is Bootstrap 5.x support lacking expected?

It is version 17.1.1 now without fixing this issue!!

Could folks try again on 17.2 [released now]. I followed up internally to understand when fixes landed and it looks like they should all be in the 17.2 release 😄

Same with mine projects, whole VS2022 drives me nuts. At least legacy editor fixed Razor pages issue.
@neozhu Thanks!

Nice solution. Thanks, you saved my day.

Seems like this is working for folks, so going to close it out. Feel free to log new issues if anything else comes up!

Labels

bug

Something isn't working

Does Visual Studio support Bootstrap 5?

Visual Studio not only supports Bootstrap, but it can also generate your views using Bootstrap.

Can I use Visual Studio for Bootstrap?

Bootstrap is an open source toolkit for developing with HTML, CSS, and JS. Visual studio makes it easy to identify which classes are coming from the Bootstrap CSS framework by showing the logo in the completion list.

Is Bootstrap good in 2022?

Any CSS framework is a good choice for 2022. It's just that Bootstrap comes with limited designs for which designs from outside has to be integrated. In Bootstrap, we can add pre-defined class into the code without writing code. Used by many companies well known companies like Twitter, Udemy, Spotify and more.

Bài mới nhất

Chủ Đề