Technical details: I'm using a Windows 10 VM, Visual Studio 19, C# Latest .NET Framework.
I am having this problem with multiple methods, but I'll use a single one for demonstration purpose.
I have a function in my WCF Service file, in it's own project, as such:
public bool FindSalesOrder(
Int64 OrderNo,
out string ReturnMessage,
out SalesActiveOrderHeaderBDO OrderHeader,
out SalesActiveOrderLineDataTable OrderLines,
out SalesActiveOrderNoteDataTable OrderNotes)
And the same function in the Service Contract:
[OperationContract]
bool FindSalesOrder(
Int64 OrderNo,
out string ReturnMessage,
out SalesActiveOrderHeaderBDO OrderHeader,
out SalesActiveOrderLineDataTable OrderLines,
out SalesActiveOrderNoteDataTable OrderNotes);
But when I go to the UI project and click "Update Service Reference", I get plenty of errors, which when I go to, it's complaining about conversion. When I go to the Reference.cs and navigate to the same function, I find it has been changed to:
public bool FindSalesOrder(
long OrderNo,
out string ReturnMessage,
out CentricNamespace.SalesActiveOrderHeaderBDO OrderHeader,
out CentricNamespace.CentricCoreDataSet.PurchaseActiveOrderLineDataTable OrderLines,
out CentricNamespace.CentricCoreDataSet.PurchaseActiveOrderNoteDataTable OrderNotes)
I can manually fix these issues by just replacing "Purchase" with "Sales" and it all works perfectly fine, but I don't feel like doing this each time I need to update the service reference. Additionally, when I have fixed all the errors, then look for the above function(with Purchase instead of Sales, using the built-in Visual Studio search feature), it doesn't find it. So I am unsure of where it is getting this from?
Any help would be greatly appreciated! (Any extra info you need, I'd be happy to give out(as long as it's not sensitive information of course)).