We help IT Professionals succeed at work.
Get Started

After upgrading from VS2008 to VS2010, WCF proxy project won't build

SoCalKen99
SoCalKen99 asked
on
587 Views
Last Modified: 2013-11-26
I have a C# WCF proxy client project that uses a service reference.  This proxy is used by a C++/CLI app to communicate with a server app.  Everything built and worked fine with VS2008. After upgrading to VS2010, I'm getting build errors.  Here's the deal:

This is my service definition:
[ServiceContract(Name = "NavigatorAPDServiceContract",
                    Namespace = "http://www.radiusarm.com/NavigatorAPDServices/2009/03",
                    CallbackContract = typeof(INavigatorAPDServiceCallback),
                    SessionMode = SessionMode.Required)]
   public interface INavigatorAPDService
   {
   ...
   }

Open in new window


Here is the callback contract:
   public interface INavigatorAPDServiceCallback
   {
      [OperationContract(Name = "AVSStartup")]
      [FaultContract(typeof(ReceiverFaultDetail))]
      [FaultContract(typeof(SenderFaultDetail))]
      AVSControlMsgResult AVSStartup(OCAVSStartup requestMessage);
      ...
   }

Open in new window


I have a separate assembly with common types shared between clients and server, defined in namespace Radius.Navigator.CommonContentTypes.

The auto-generated service reference code from VS2008 for this method looks like this:
[System.ServiceModel.OperationContractAttribute (Action="http://www.radiusarm.com/NavigatorAPDServices/2009/03/NavigatorAPDServiceContract" + "/AVSStartup", ReplyAction="http://www.radiusarm.com/NavigatorAPDServices/2009/03/NavigatorAPDServiceContract" + "/AVSStartupResponse")]
--- fault contract info omitted for brevity ---
Radius.Navigator.CommonContentTypes.AVSControlMsgResult AVSStartup(Radius.Navigator.CommonContentTypes.OCAVSStartup requestMessage);

Open in new window


Note that the parameter type of the method is OCAVSStartup in namespace Radius.Navigator.CommonContentTypes.

The auto-generated service reference code from VS2010 for this method looks like this:
[System.ServiceModel.OperationContractAttribute(Action="http://www.radiusarm.com/NavigatorAPDServices/2009/03/NavigatorAPDServiceContract" + "/AVSStartup", ReplyAction="http://www.radiusarm.com/NavigatorAPDServices/2009/03/NavigatorAPDServiceContract" + "/AVSStartupResponse")]
--- fault contract info omitted for brevity ---
[System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(OCAVSMessageBase))]
Radius.Navigator.APDClient.NavigatorServiceReference.AVSStartupResponse AVSStartup(Radius.Navigator.APDClient.NavigatorServiceReference.AVSStartupSolicit request);

Open in new window


Note that the parameter type of the method is AVSStartupSolicit in namespace Radius.Navigator.APDClient.NavigatorServiceReference. Radius.Navigator.APDClient is the namespace of the proxy app & NavigatorServiceReference is the name of the service reference.

Here is the build error:
error CS0535: 'Radius.Navigator.APDClient.APDCallback' does not implement interface member 'Radius.Navigator.APDClient.NavigatorServiceReference.NavigatorAPDServiceContractCallback.AVSStartup(Radius.Navigator.APDClient.NavigatorServiceReference.AVSStartupSolicit)'

My question is this: why is VS2010 creating this new type (AVSStartupSolicit) & is there any way to force it to behave as VS2008 did (and generate code that uses the parameter type as defined in my callback contract)?  This interface has dozens of members and it is a large refactoring project to locate and change all usages of this interface.

Thanks for any insights you can provide, experts!
Comment
Watch Question
This problem has been solved!
Unlock 1 Answer and 6 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE