简体   繁体   中英

Why, when adding a service reference in VS2010, is the client class not generated?

I'm going insane, I beleive.

That is, I've never had an issue like this before, and nobody (that Google has indexed) seems to be having the same issue.

Whenever I add a reference to a particular ASMX service to a VS2010 project, all of the code is generated, there is an interface ServiceSoap that represents all of the features of the service, but there is no concrete implementation of that interface anywhere in the solution!

What am I doing wrong? I just right click project , add service reference , paste url to .asmx , type 'Blah' in the namespace box , click OK .

Everything seems to happen OK. I'm just bat-shit insane, I guess...


Update:
If I go to Advanced... in the add service reference dialog, and choose to add it as a .NET 2.0 service, everything works, but I don't particularly want to do it that way.
The actual namespace I'm using is Remedy and the service .asmx file is Service.asmx .

Try this...

right click on the service reference. then go to configure service reference. then uncheck reuse types in referenced assemblies checkbox. upd

this solved mine, hope it will help somebody else too

Try these steps:

  1. Look in the Output window to see if there are any errors when you use the "Add Service Reference".
  2. Look in the Reference.cs to see if there are any errors (generated as comments).
  3. Finally, try using svcutil.exe to generate the proxies, since it will be easier to see error messages.

Have you tried clicking "Show all files"?

替代文字

With this feature on, the Service Reference can be expanded to its various "source" files.

While clicking "show all files" icon. There is another folder which they hold the same name. while deleting the folder. and clean the solution. Add new services with the same name. Now its working fine.

右键单击引用,然后 - “在对象浏览器中查看”只需双击对象资源管理器中的一个方法/属性。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM