This is my default application: c: \ Program Files \ Product \ API.dll (registered in Gac)
c: \ Program Files \ Product \ ApiImpl1.dll (Non Gac)
c: \ Program Files \ Product \ ApiImpl2.dll (Non Gac)
c: \ ConsoleApplication \ TestApi.exe
Api.dll is Facade for Application that implements "c: \ Program Files \ Product" Api.Dll is registered in the GAC and has an Assembly Resolver for DLL located in the folder "c: \ Program Files \ Product" Api.dll is referenced both on ApiImpl1.dll and ApiImpl2.dll.
The problem is that in ConsoleApplication I am adding a link to Api.dll. Visual Studio copies ApiImpl1.dll and ApiImpl2.dll to the project destination address. (Although CopyLocal = False) I am adding a link by looking at "c: \ Program Files \ Product \ API.dll"
As far as I know, I have several solutions:
1) Register ApiImpl1.dll and ApiImpl2.dll in the GAC (unacceptable, I have a Resolver Assembly for this)
2) Add to the ".Net Add Reference" Registry, "c: \ Program Files \ Product "(does not solve the problem)
3) Add to the" .Net Add the link "Registry", c: \ windows \ Assembly \ gac_msil \ Api.dll (allow, but this is a bad solution)
4) Manually change the attribute ConsoleApplication.csproj and Remove HintPath links Api.dll. (Not acceptable, because I will have many clients that will use this API)
source
share