How to Create simple HTML/CSS project in Visual Studio 2022

Coreysan 1,651 Reputation points
2024-05-07T19:07:57.77+00:00

I'm so used to creating simple HTML projects in 2019. How do I do the same thing in 2022? I don't want Core at all, just a project that will launch from a basic index.html. I can't even find a way to add an HTML file to an empty project.

What's the best way in VS 2022?

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,574 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,396 questions
0 comments No comments
{count} votes

Accepted answer
  1. Albert Kallal 5,226 Reputation points
    2024-05-07T22:54:50.0966667+00:00

    I would just create say a webforms site say this choice:

    User's image

    Next page type in your name for your project, and then next,

    then say choose this:

    User's image

    So, empty site, and I un-checked the https option (you can always add that back later).

    The end result is now this:

    makehtml

    Of course, JUST in case you might want to write some server side code, then choose c# or vb.net. In above, I choose a vb.net project, but you just adding html pages to the project, and not aspx pages, then you really don't care.

    Do keep in mind that to create these simple (and empty) asp.net projects (webforms), then you need to install the additional workflows for Visual Studio, since they are not installed by default.

    That would be these:

    User's image

    So, it really comes down to if you wanting to add, or use code behind pages, or you just looking to add some html pages and play.

    So, the older (previous) templates are not installed by default anymore, as most are using MVC and blazer projects. However, the older types of projects that you used and loved in the past are still available, they are not just installed by default anymore.

    2 people found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 60,376 Reputation points
    2024-05-07T20:59:58.18+00:00

    You have a couple options

    • Just open local folder.
    • create a blank solution and just add html file to the solution.
    • node console app if you want to use the node build chain tools
    0 comments No comments

  2. QiYou-MSFT 4,311 Reputation points Microsoft Vendor
    2024-05-08T03:07:12.29+00:00

    Hi @Coreysan

    First you mentioned that you don't want to use Core. We can open Visual Studio Install to install an older version of ASP.NET Framework.

    123

    The next step is to create the ASP.NET Web Application(.NET Framework) project.

    456

    To make the project cleaner, we can choose an empty project.

    8910

    Then we can create an HTML project.

    789

    Edit the project here and run.

    91011

    111213

    Finally, we can see the results.

    131415

    Best regards,

    Qi You


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments