There is a Solution, there are 3 projects in it: ASP.NET WebAPI, Class Library and UnitTest

References are from the WebAPI to the Class Library and from the UnitTest to the WebAPI and to the Class Library

The Class Library contains several ServiceReferences on the WCF service and the Repository class, providing outside access to the WCF service methods. However, I cannot use the Repository instance either in the WebApi project or in the UnitTest project, I get a runtime exception with the requirement to add a ServiceReference to these projects too. How to avoid this and make sure that neither WebApi project nor UnitTest project knows about the existence of a ServiceReference and uses only Repository? thank

    0