安装和使用程序集,DLL

编程入门 行业动态 更新时间:2024-10-23 11:22:45
本文介绍了安装和使用程序集,DLL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

你好朋友, 我正在使用MySql.Data.dll,版本= 5.0.8.1. 实际上,每当我使用VWD 2010时,始终需要在我的项目或Web应用程序的bin文件夹中引用此dll. 为此,我使用gacutil.exe在全球程序集缓存中安装了该dll. 这样我就不必在每个Web应用程序中都对其进行引用,因为一旦安装,我想我可以像使用MySql.Data.MySqlClient;一样直接使用; 但这没有发生... 当我使用以下命令检查命令提示符时. 即

Hello friends, I am using MySql.Data.dll, version = 5.0.8.1. Actually whenever I work on VWD 2010, always need to make a reference of this dll in my project or web application in bin folder. For this I installed this dll in Global Assembly Cache using gacutil.exe So that I don''t need to make a reference it in every web application because once it installed I think I can directly use like using MySql.Data.MySqlClient; But this is not happening... and when I check on command prompt with following command. i.e.

C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin>gacutil /l MySql.Data Microsoft (R) .NET Global Assembly Cache Utility. Version 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. The Global Assembly Cache contains the following assemblies: MySql.Data, Version=5.0.8.1, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL Number of items = 1 C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin>

请指导我如何在我的应用程序中使用GAC,或者我缺少使用任何步骤. 或者,请告诉我正确的使用方式. 谢谢.

Please guide me how can i utilize GAC in my application or I am missing any step to use. Or Please tell me the right way to use it. Thanks.

推荐答案

GAC用于并排存储不同版本的DLL,以便应用程序可以使用其构建的内容而不会发生冲突. 无论如何,您都必须添加对项目中所需的DLL的引用. 不幸的是,Visual Studio无法从GAC添加,并且您必须在GAC之外具有DLL的副本才能被引用,即在文件夹中. GAC is for storing different versions of DLL side by side so applications can use what they are built for without conflicts. You must add a reference to the DLL needed in your project in any case. Unfortunately Visual Studio cannot add from the GAC and you must have a copy of the DLL outside of GAC for it to be referenced ie in a folder.

更多推荐

安装和使用程序集,DLL

本文发布于:2023-11-13 14:29:02,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1584575.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:程序   DLL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!