c# - Dynamically add reference of OData service in multiple projects -


i have similar situation here: dynamically add reference of wcf service

however, there 1 class library, references wcf service - let's call cl1. there multiple projects - let's call them p1 , p2 - reference cl1.

how looks now: there 2 versions of cl1, because don't know how dynamically add wcf service reference. looks this:

p1 uses cl1 version 1.

p2 uses cl1 version 2.

however, rather inject url of service pl1 , pl2 cl1. don't have maintain 2 versions!

so should rather this:

goal

p1 , p2 inject service-url cl1. cl1 adds or updates service reference (generate reference.cs , rebuilds itself).

any ideas of how achieve this? or may there better approaches?


Comments