How to add a Web Form .aspx file in Visual Studio 2022

Marilee Turscak
Oct 29, 2024

--

In the process of building an IIS web app today, I got stuck for 20 minutes while trying to add a Web Form .aspx file. Turns out you need to an extra .NET Framework template that isn’t installed by default in newer versions of Visual Studio.

To resolve this issue:

  1. Go to the VisualStudioSetup.exe and select “Modify.”

2. Under “Web and Cloud”, select ASP.NET and Web development.

3. Under Installation Details > Azure Development > Optional, select .NET Framework project and item templates.

4. Install the new template.

5. Then, create a new ASP.NET Web Application.

6. Add Web Forms

7. Click Solution > Add > New Item > select Web Form, and add the .aspx file.

--

--