Click here to Skip to main content
13,898,496 members
Rate this:
 
Please Sign up or sign in to 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
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

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/[^].
   
Comments
   
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????
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

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:

<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
   
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?
   
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.
   
What do you mean "only"? - not true.
All directories are equal -- will work as I say.
By the way, why are your installing your application in "Users"? Whatever, this is up to you. I gave you a solution without CAG, read it. It will work with absolute path (not so good, I would say), relative path, any combination. What's "not possible"? I say possible.
--SA
fatlander 8-Oct-15 10:42am
   
probing only allows to reference SUB directories inside the base application's path.
so no, your solution doesnt work and your answer is useless
   
Who told you so? It can be anywhere. So, it's not the solution doesn't work, it's your understanding does not work here.
—SA
d0s'A 29-Jun-16 6:41am
   
fatlander is right. You can specify a relative path, but it's required to specify only subfolder. See msdn for more info!
   
It looks like you are right, thank you very much; I'll fix the code sample.
Anyway, the purpose it to share some directory with assemblies by several applications; which is perfectly possible. How can it make my approach "useless"?
—SA
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

If they all access the same 3rd party library you only need to deploy it into the GAC once.
   
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
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 4

   

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Cookies | Terms of Service
Web03 | 2.8.190306.1 | Last Updated 29 Jun 2016
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100