Home  /  Questions  /  Question

60   95.3
Jul 26, 2012

WPF - Update Service Reference

When I update the service reference without making any changes to Patterns in Action 4.0_1, it produces 3 error messages (all the same) on Mapper.cs of the WPF Model project.

Error 1 Cannot implicitly convert type 'double' to 'float'. An explicit conversion exists (are you missing a cast?) \WPFModel\DataTransferObjectMapper\Mapper.cs

this occurs on:


I am running VS 2010 SP1.  Just curious on how to work around this.  If I don't update the service reference, then it will build and run without errors.

Why would just updating the service reference break the application?

65   95.8
Aug 04, 2012
Hi, Ereck.

Sounds like the service's interface has changed?

If I download a copy from this site, install it, open Patterns in Action in visual studio and do nothing but Update the service reference, the error occurs. How would that be an interface problem? I haven't changed anything at all. --- Ereck Johan  Aug 04, 2012
Funny, when I updated the service reference I had 38 errors because of namespace errors. Once I took care of that problem I was able to reproduce your problem, only I get the error: "Implicit conversion from 'Double' to 'Single". A different version of the code maybe? Anyway, just use the "Convert" class. In my case Convert.ToSingle(ord.Freight); , etc. Mike --- Michael Lopez  Aug 22, 2012