I've been having the following problem:
I have a WCF project, MyService, which references another project, MyProject. This other project has a Class called MyClass and I am passing it as a parameter to a WCF Method.
Now when I test my WCF service in a simple Console app I need to pass an Object of the type MyService.MyClass, but this Class is non-existant! It should be MyProject.MyClass.
I have checked that everything in MyClass is Serializable, so that should not be the problem.
So far the only thing I do is pass MyClass to a Method and nothing else. It does not call other Methods in MyClass whatsoever.
And actually, in my Console app I can instantiate all kinds of stuff from MyService that are actually defined in MyProject.
Why does my WCF service/Console app think that all those Classes belong to MyService instead of MyProject?
I have the MyProject referenced in both service and client side.
What's more, this worked a few days ago. I made some changes to MyProject (not MyClass or any Class it uses though) and now it doesn't work anymore.
My ServiceContract looks as follows:
Public Interface IMyService
Function DoSomething(mc As MyProject.MyClass) As Integer
Here is the Service.
Public Class MyService
Public Function DoSomething(mc As MyProject.MyClass) As Integer Implements IMyService.DoSomething
MyClass is defined as follows:
Public Class MyClass
Public Function DoStuff As AnotherClass
SomethingCompletelyDifferent and AnotherClass stay within the Service and do not communicate to the client app. So I do not expect those to be the problem. My client app has a reference to MyProject and simply does the following.
Dim service As ServiceReference.MyService
Dim mc As New MyProject.MyClass
Now where did it get MyService.MyClass from?