你好朋友, 我正在使用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
发布评论