I have an issue that seems to be identical to this question. I am unable to add a service reference to any project in Visual Studio. I went so far as to format the entire computer, re-install Windows (Windows 7 Ultimate), and VS2010 Professional. Twice. This is a work computer that I inherited and I find it odd that, even after formatting the drive and reinstalling everything, I cannot add a service reference to any project on this computer.
I am 100% certain that .NET 3.5 is being targeted in my project's settings and even created an empty project to try it out. Same results. I am not sure what I am missing. I am pulling the original solution from TFS (nobody else has this problem) so it's not like I'm missing something in the solution.
Any thoughts?
Edit:
I just created another account (Admin as well) and I can add service references to projects under that account. Am I missing something? My original account has an apostrophe in it--would that mess things up?
Edit 2:
While this has been fixed, I am not happy with the fix-action. I will be opening up a bug with Microsoft later, but I am curious to understand what caused this in the first place and how to avoid it in the future.
Edit 3:
I opened a bug report with Microsoft (here).
Work Around:
My work around, as posted in my bug report, was to create a new Windows user account on the machine (making sure not to have an apostrophe in the name). For whatever reason, this new account is able to add service references but the original still cannot.
(If somebody can post a solution that allows the original account to be able to add service references, I will change that answer to the selected answer.)
Same thing happened to me. My original account has an apostrophe, so I created a second DevUser account which works fine.
I finally solved , I realize that Extention Manager can't reach Online Gallery.Beside I could add a service reference in my domain. In my case this was an internet connection problem. I opened devenv.exe.config file and found the proxy it shows our tfs address,but I can't beleive that! How could it be? I commented it and everythings seems fine now.
here is the answer Cannot connect to any online resource
<system.net>
<defaultProxy enabled="true" useDefaultCredentials="true">
<!--proxy bypassonlocal="True" proxyaddress="http://tfs.mycompany.com.tr:8080/tfs/productdevelopmentserverxxx"/-->
</defaultProxy>
<settings>
<ipv6 enabled="true"/>
<servicePointManager expect100Continue="false" />
</settings>
</system.net>
Also have a look at this
Be sure you are not in debug mode when you are trying to add the service reference! This one caught me!
来源:https://stackoverflow.com/questions/6741123/vs2010-add-service-reference-missing-unable-to-add-service-reference