For a .NET project, I want to add a Web Reference using a WSDL file, but there is no Add Web Reference when right clicking a project in Visual Studio 2022 / 2019. Where is it?
Visual Studio 2022 / 2019 Add Web Reference missing
problem
solution
It's different for modern .NET and .NET Framework projects.
For modern .NET (.NET Core / .NET 5 to .NET 8):
- Right click the project in Solution Explorer, go on Add and then Connected Service
- Click Add a service reference
- Select WCF Web Service, click Next
- Add your WSDL URL in the URI or click Browse to select the WSDL file
For .NET Framework (up to 4.8):
- Right click the project in Solution Explorer, go on Add and then Service Reference
- Click the Advanced button in the lower left corner
- There you have it, again in the lower left corner, Add Web Reference
Author: Dan Dumitru
Last Edit:
January 20, 2024
5 Thanks received
Last Edit | January 20, 2024 |
Created | May 7, 2020 |
Views | 871 |
Tags |
Visual Studio
|
Other Visual Studio Posts
Join us!
Do you like this website?
Bookmark it and come back here to write a post yourself when you run into something shareable.
Early collaborators will get to own a part of the project (5 to 20%)... >> read more
Your Comment
Feel free to post additional info or improvement suggestions.
8 Comments
Hi Dan, I have a problem with this, in the past 2022 this works fine. Now in 2023 i get a error "Missing File" after clicking "Add Reference", have you got same problem?
Many Thank Ulrich
Hi Ulrich! It still works for me, I've just tried adding a random WSDL file as a Web Reference.
I'm on the latest version of Visual Studio 2022, 17.4.4
Hi Ulrich, You probably are using Git right? Empty folders aren't kept. You need to create an empty folder, on the project folder, named something like "Web References". Not sure the precise name, but Google around and you'll find it.
An ASMX web service added as a 'Service Reference' generate different proxy code than adding it as a 'Web Reference'. That means I cannot migrate my project that has an ASMX web service dependency added as 'Web Referenece' from .NET Framework to .NET (Core), because in .NET (Core) you can only add dependency as 'WCF Web Service' that generates different proxy.
After displaying the Connected Services form I only have the option to "Add a service dependency" and not a "Service Reference" in my VS2022 .Net6.0 WinForm app.
I only now got around to check this, but there IS an 'Add a service reference' option in the latest version of Visual Studio 2022, 17.9.0, for a WinForms app on .NET 6. The same for .NET 8.
It is missing when you try to create a console app... using Visual Studio 17.9.6.
@Jack - I checked now and it is there. I tried with a Console App on .NET 8 using Visual Studio 17.9.6.