开发者

VS2010 unable to add service reference

I have a project which was originally written in VS2008 (professional). I have created a vs2010 solution (using VS2010 professional) from the projects within the VS2008 solution but am not able to add a service reference from the domain layer of the solution (a class library project). I've checked that the domain layer project is targeting framework 3.5 or 4.0, and have tried repairing and even re-installing VS2010 but still cannot add a service reference.

The "service reference" option is missing when I right click the project. There was also an existing "Web Service" reference which now fails when called during unit testing.开发者_如何学JAVA

Has any one else experienced this problem ?


Check your project and make sure it is referencing framework 3.5 or higher.

  1. View the project properties.
  2. Go to Compile Tab
  3. Click the Advanced Compile Options button
  4. Look at the Target Framework combobox.
  5. Change it to 3.5 or 4.
  6. Click OK to close dialogs
  7. Right click on project now.


For Visual Studio 10 in Windows 8. The "Add Service Reference" does not shown for 3.5 Framework or Earlier. You have to change the .NET Framework of Project to 4.0


Changing the Target framework to 3.5 enabled the option for me.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜