Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hello Friend,

I have application which deployment done using click once facility.
I have more than 10 project like this and all access same 3rd party library.

I don't want to install all library in GAC so system load can increase also click once install in temp folder so for each click once this library are copies and acquire huge space.

I think if i make a small framework and install it in predefine folder and then get reference from all lib from that folder to click once code. I try to search for that but not get good result.

Please help me or any other suggestion is welcome.

Thanks,
Asif Huddani
Posted

I got interested and did some looking around - I found a very cool blog that may provide the answer to your problems - http://nbaked.wordpress.com/2010/03/28/gac-alternative/[^].
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 30-Jan-11 1:43am    
Very useful reference - my 5.
I provided probably the simplest working method, please see.
--SA
Asif Huddani 31-Jan-11 6:19am    
Hi Abhinav nice article but my question is still more complected..
i have 10 project and each use same infragistics ddl which has around 100Mb.
if i have to deploy at one location then how all projects knows that because this change is for only machine.config for particular framework.
and if i remove all dll from my project then it want allow me to publish.

i change property of each dll to CopyLocal flase. and then change machine.config and specify path.. When i publish work properly but at anohter system same path in machine.config but when i try to install my application then it throws error that file not found in GAC... any solution????
Yes, you can do it without GAC, and you don't even need to have the absolute folder name for you libraries.

All you need to do is to make sure every application points to the library path relative to its executable path. For example, if you have several applications with the names *.exe. Then for each one you need a file with the name *.exe.config looking like this:

XML
<configuration>
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <probing privatePath=".\MySharedLibraries"/>
        </assemblyBinding>
    </runtime>
</configuration>


Basically, using this method, you can choose different directory structures, to share some assemblies by several applications.

—SA
 
Share this answer
 
v2
Comments
Abhinav S 30-Jan-11 2:06am    
This looks quite ok. 5.
My question though would be will it work for another application pointing to the same shared assembles?
Sergey Alexandrovich Kryukov 30-Jan-11 2:22am    
Thank you, Abhinav.

Yes, of course it will work. This is a whole point.
I answered because this is the way I use for my applications.
You see, in many aspects, .NET changes the course a bit; it goes away from installations and helps to reduce DLL help; and I like the trend very much. (An application should run no matter where you put the files; some installation step can happen during first run; registry should not be contaminated. The *.exe.config is one simple way to resolve dependencies.)
--SA
Abhinav S 30-Jan-11 11:03am    
Thanks.
Espen Harlinn 30-Jan-11 4:15am    
5+ Good answer, good to know
Asif Huddani 31-Jan-11 6:22am    
Hi,

probing is only search inside bin directory or application directory.
I have 10 application which i publish as click once in .net so they install in "C:\Users\ahuddani\AppData\Local\Apps\2.0\J99BQE5J.KV1\6JX14ZMC.NLY" location and then global path i think it's complicated and not possible. i want to use common path C:\asif\assembly but not GAC.
If they all access the same 3rd party library you only need to deploy it into the GAC once.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 30-Jan-11 14:12pm    
"Only once" is correct, but adding to GAC is not a must, see two other answers and my discussion with Abhinav.
--SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900