Can't find Web Form item in Visual Studio
Asked Answered
J

3

6

I can't seem to find a Web Form item when adding trying to add a new item in my ASP.NET web application project in Visual studio 17.0.1. Any help?

add item picture

Jailhouse answered 5/12, 2021 at 14:8 Comment(3)
How are you adding the new item?Rufusrug
@AndrewMorton right clicking on the web application folder then selceting add new item, but i can't find it in the web and c# visual sectionsJailhouse
I can take no credit for this solution: Visual Studio : How to fix missing ASP.NET template for .NET Framework. Basically, add the individual component ".NET Framework project and item templates" in Visual Studio Installer.Rufusrug
J
11

It was solved by modifying the installation in Visual Studio Installer and installing the ".NET Framework project and item templates" component under the "Individual components" tab.

Credits to: https://www.howtosolutions.net/2021/11/visual-studio-missing-asp-net-web-application-template-dotnet-framework/

Jailhouse answered 5/12, 2021 at 16:46 Comment(0)
F
5

I saw this problem in "Visual Studio 2022 preview" too. It was solved by modifying and installing the ".NET Framework project and item templates" (in Visual Studio Installer):

like this

Forsterite answered 20/1 at 13:52 Comment(0)
A
0

Messing with the VS installer didn't work for me, but I found a partial work-around. It seems only the "direct menu" version of the Web Form creator still works. But it's only available in a Web Form Solution. Projects of type "Web Site" and other project/solution types may now lack it.

Open an existing Web Form Solution, or create a dummy Web Form Solution, create the page sets, and then copy them into your non-Web-Form projects.

To do this, right-click the Solution name, select Add, then Web Form.

Getting to the Web Form item menu

Ahwaz answered 18/7 at 0:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.