I am trying to migrate some legacy code from .NET 4 to .NET 4.8.
I've got a WCF Service that is used by a web application (referenced in the web project as a service reference). I have a class library projects of common object types that are used by both the WCF Service, and the web application. Everything was working fine --- I was able to compile the web application and have the object types be resolved correctly.
However, since I converted to .NET 4.8, I'm getting a compiler error indicating that Service object cannot be converted to the web object. Again, this did work in previous versions of .NET with the code, and there have been no programmatic changes.
I have verified that the service reference is configured to re-use types in all assemblies and the radio button is selected for re-using types in all assemblies. I have also the other option of re-using objects in selected assemblies and highlight the appropriate shared assemblies that pertain to just my problem.
Is there something I missed or is different now in .NET 4.8?
Small code sample (hopefully this helps):
In my web page (with MainWCFService included via a Service Reference):
CommonLibrary.User user = null;
user = MainWCFService.GetUser()
Error: Cannot implicitly convert type 'MainWebProject.MainWCFService.User' to 'CommonLibrary.User'
Note: on the WCF Service side, the function "GetUser" also returns a variable of type "CommonLibrary.User"
Follow up: the issue definitely appears to be related to 4.8. When I upgraded the project to 4.7.2, the references resolved as expected and my project compiled with the service reference as it did in previous version.