views:

110

answers:

1

I have a silverlight library which I have added a wcf service reference. Call this library A.dll. This library contains other functions and I prefer to have the wcf code in another library.

I now have created another silverlight class library which I have added the same wcf service reference (call this library B.dll) and want the first silverlight library to reference the wcf service.

If I reference A.dll in B.dll I do not get a circular reference.

I still have the wcf reference code in A.dll but with a different namespace than the wcf reference code in B.dll (not sure if this related to the problem).

Any ideas why I get this error when I reference B.dll in A.dll?

JD.

Ps. I know that I could create an interface library to provide another design but at the moment I am not sure why this error is happening.

+1  A: 

I still have the wcf reference code in A.dll but with a different namespace than the wcf reference code in B.dll (not sure if this related to the problem).

I think that even though the namespaces are different, as you have already identified you have created a circular assembly reference.

VS builds dependent (referenced) assemblies first. If you ahve a circular reference, VS won't know which order to build the projects, hence the error you are getting.

HTH,
Mark

Mark Cooper