- 参考bin或GAC以外的第三方库 [英] -Reference 3rd party Library other than bin or GAC

查看:75
本文介绍了 - 参考bin或GAC以外的第三方库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Friend,



我有应用程序使用click click facility完成部署。

我有超过10个这样的项目和所有访问相同的第三方库。



我不想在GAC中安装所有库,因此系统负载可以增加也可以在temp文件夹中单击安装,以便每次点击一旦这个库是副本并获得巨大空间。



我想如果我制作一个小框架并将其安装在预定义文件夹中,然后从该文件夹中的所有lib获取引用单击一次代码。我尝试搜索但没有得到好结果。



请帮助我或任何其他建议是欢迎的。



谢谢,

Asif Huddani

解决方案

我感兴趣并做了一些环顾四周 - 我找到了一个非常酷的博客为您的问题提供答案 - http://nbaked.wordpress.com/2010/03/28/ gac-alternative / [ ^ ]。


是的,您可以在没有GAC的情况下完成,甚至不需要为您的库提供绝对文件夹名称。



您需要做的就是确保每个应用程序都指向相对于其可执行路径的库路径。例如,如果您有多个名称为 * .exe 的应用程序。然后对于每一个你需要一个名为 * .exe.config 的文件,如下所示:



< pre lang =xml> < configuration >
< runtime > ;
< assemblyBinding xmlns = urn:schemas-microsoft -com:asm.v1 >
< 探测 privatePath = 。\ MySharedLibraries / >
< / assemblyBinding >
< ; / runtime >
< / configuration >





基本上,使用这种方法,您可以选择不同的目录结构,通过多个应用程序共享一些程序集。



< dd> -SA


如果他们都访问相同的第三方库,您只需将其部署到GAC一次。


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

解决方案

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/[^].


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


If they all access the same 3rd party library you only need to deploy it into the GAC once.


这篇关于 - 参考bin或GAC以外的第三方库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆