简体   繁体   中英

Visual Studio 2017 - After upgrade from .Net Framework 4.52 to 4.61 unable to update service references

I have a Winforms application which uses WCF service (also part of the solution) I am using the Visual Studio 2017 with.Net Framework 4.52 and everything was working fine. I upgraded the project to.Net Framework 4.61 (all projects in current solution including WCF project) after the upgrade I am unable to update service reference in WinForms project and keep getting below error

The current project does not support service references. To enable windows communication foundation support, change the target version of the Microsoft.Net Framework

I trying restarting Visual Studio and my machine but still no luck. I can assure that there is no error in any of the projects because if I downgrade project back to.Net Framework 4.52 then I am able to update service reference successfully so something Visual Studio don't like about 4.61!

Try to reproduce your problem but no success.You can use svcutil to generate proxy classes,svcutil is a .NET tool that retrieves metadata from a web service on a.network location or from a WSDL file, and generates a WCF class containing client proxy methods that access the web service operations.

You can use this tool on the command-line interface of VS:

在此处输入图像描述

Executing the above command will generate the a proxy class and configuration file on disk D.Then add these two files to your project:

在此处输入图像描述

You can also try to add a new service reference and delete the original service reference.

Feel free to let me know if the problem persists.

I had the same problem with.Net 4.6 and after installing 4.6.2 the problem was resolved

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