Add Reference to GAC Assembly copies Non GAC dependent assemblies recursively (c# Visual Studio 2008)
This is my application deplyoment:
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 which implemented "c:\Program Files\Product\"
Api.Dll is registered in GAC and has Assembly Resolver to DLLs which is located in "c:\Program Files\Product\"
Api.dll reference both ApiImpl1.dll and ApiImpl2.dll.

The problem is when in ConsoleApplication I add reference to Api.dll Visual Studio copies recusively the ApiImpl1.dll and ApiImpl2.dll to the project destination. (Although CopyLocal=False)
I add the reference by Browsing to "c:\Program Files\Product\API.dll"

As far as I know, I have several solutions:  
1) Register ApiImpl1.dll and ApiImpl2.dll in GAC (Not acceptable, I have the Assembly Resolver for this)  
2) Add to ".Net Add Reference" Registry, "c:\Program Files\Product" (Doesn't solve it)  
3) Add to ".Net Add Reference" Registry, "c:\windows\Assembly\gac_msil\Api.dll (Solve it, but it is a bad solution)  
4) Manually Change the ConsoleApplication.csproj and Remove HintPath attribute of Api.dll Reference. (Not acceptable, Because I will have a lot of customers which will use this API)  
















 

































Add Reference to GAC Assembly copies Non GAC dependent assemblies recursively (c# Visual Studio 2008)
===

This is my application deplyoment:
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 which implemented "c:\Program Files\Product\"
Api.Dll is registered in GAC and has Assembly Resolver to DLLs which is located in "c:\Program Files\Product\"
Api.dll reference both ApiImpl1.dll and ApiImpl2.dll.

The problem is when in ConsoleApplication I add reference to Api.dll Visual Studio copies recusively the ApiImpl1.dll and ApiImpl2.dll to the project destination. (Although CopyLocal=False)
I add the reference by Browsing to "c:\Program Files\Product\API.dll"

As far as I know, I have several solutions:  
1) Register ApiImpl1.dll and ApiImpl2.dll in GAC (Not acceptable, I have the Assembly Resolver for this)  
2) Add to ".Net Add Reference" Registry, "c:\Program Files\Product" (Doesn't solve it)  
3) Add to ".Net Add Reference" Registry, "c:\windows\Assembly\gac_msil\Api.dll (Solve it, but it is a bad solution)  
4) Manually Change the ConsoleApplication.csproj and Remove HintPath attribute of Api.dll Reference. (Not acceptable, Because I will have a lot of customers which will use this API)  
















 
































