How to add web service asmx file in vs 20220?

Perry M 26 Reputation points
2022-02-10T20:26:45.333+00:00

Hi,

Using Visual Studio 2022, the option for adding a Web Service (ASMX) has disappeard from the default c# list.

Please advise

Visual Studio Setup
Visual Studio Setup
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
1,000 questions
0 comments No comments
{count} votes

Accepted answer
  1. Anna Xiu-MSFT 27,641 Reputation points Microsoft Vendor
    2022-02-11T03:19:54.903+00:00

    Hi @Perry M ,

    Welcome to Microsoft Q&A!

    Please refer to the document to add Web Service (ASMX) file in VS 2022: create ASP.NET Web Application(.NET Framework) project > right-click your project > Add > New Item… > search Web Service (ASMX) > click on Add.

    If you can’t find the ASP.NET Web Application(.NET Framework) project template, please close all instances of Visual Studio and open your VS installer > Modify > install “.NET Framework project and item templates” in Individual components.

    Sincerely,
    Anna
    *
    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.

    5 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Glx 0 Reputation points
    2024-01-31T18:56:37.42+00:00

    To add Web Service (ASMX) you need:

    1. Add individual component "Web development tools for .NET Core 2.1 (Out of support);

    31-01-2024 20-40-04

    1. Create a new project using template "ASP.NET Web Application (.NET Framework);

    31-01-2024 20-47-45

    31-01-2024 20-49-47

    1. Add new item Web Service (ASMX);

    31-01-2024 20-51-34

    1. Run project;

    31-01-2024 20-54-53

    1. Enjoy result! :)

    31-01-2024 20-53-56

    0 comments No comments