简体   繁体   English

DLL属性复制到本地

[英]DLL property Copy to local

IN my C# project i have a "UILanguage Dll" which is located in separate folder in Binary location, The path for dll is probed in EXE.Config file of referenced application. 在我的C#项目中,我有一个“ UILanguage Dll”,该文件位于Binary位置的单独文件夹中。在所引用应用程序的EXE.Config文件中探查了dll的路径。

How to prevent a "DLL" from being set its "Copy Local" Property to True when it is referenced in other projects? 当在其他项目中引用“ DLL”时,如何防止将其“ Copy Local”属性设置为True?

In Visual Studio, go to the project that references "UILanguage Dll", locate References folder and the "UILanguage Dll" in there, right click on it, select 在Visual Studio中,转到项目引用“的UILanguage的Dll”,找到引用文件夹和“的UILanguage DLL的”在那里,右键单击它,选择

Properties > CopyLocal = False 属性> CopyLocal = False

A better way to doing this kind of stuff is to regiter the Dll into GAC. 进行此类操作的更好方法是将Dll混入GAC。

There are two way in which u can place the assembly into GAC. 您可以通过两种方式将装配体放入GAC。

Using the utility gacutil -i Here you should give the complete path of the dll 使用实用程序gacutil -i在这里您应该提供dll的完整路径

c:>gactutil -ic:\\foldername\\assemblyname\\bin\\assemblyname.dll c:> gactutil -ic:\\文件夹名称\\程序集名称\\ bin \\ assemblyname.dll

The second method is u can drag the .dll file from the bin folder of the assembly and drop it into the folder C:\\winnt\\Assembly 第二种方法是,您可以将.dll文件从程序集的bin文件夹中拖放到C:\\ winnt \\ Assembly文件夹中

Here you can see the Registering the Assembliy into GAC 在这里您可以看到将程序集注册到GAC

http://msdn.microsoft.com/en-us/library/ex0ss12c%28v=vs.80%29.aspx http://msdn.microsoft.com/zh-CN/library/ex0ss12c%28v=vs.80%29.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何设置* .dll文件的“复制本地”属性? - How to set “Copy Local” property of a *.dll file? 使用基础设施DLL的本地副本与GAC中的副本 - Using local copy of an infragistics DLL vs the copy in the GAC 为什么我的参考的Copy Local属性被禁用? - Why is the Copy Local property for my reference disabled? Web应用程序项目中引用的dll不需要在本地使用,但是除非使用复制到本地的功能,否则将无法使用? - Referenced dll in web app project is not needed local but won't work unless copy to local is used? 如何在Visual Studio社区2015中将Copy Local Property设置为true - How to Set the Copy Local Property to true in visual studio community 2015 如何动态加载/链接项目中已引用的DLL(复制本地false) - How to load/link dynamically DLL which was already referenced in project (copy local false) DLL属性无法设置 - DLL Property no settable 获取dll中的属性值 - Get value of property in dll 在WPF中,在部署XAML解析时,如果将其他本地dll的本地副本设置为false,则会从表示框架dll抛出异常 - In WPF, While deploying XAML parse exception thrown from presentation framework dll when set copy local as false for other dlls 属性何时会被调用创建引用类型的本地副本? 怎么避免呢? - When will a property get call create a local copy of a reference type? How to avoid that?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM