----------------------------------------------------------- New Message on BDOTNET
----------------------------------------------------------- From: SitaramanM Message 6 in Discussion Hi Eeswar There was a thread some time back in which the solution to your problem was given. Anyways her goes. You need to do two things for your problem a) Set the reference to the GAC Dll thru the VS.Net AddReferences DialogBox. By Default, the not all the GAC registered assemblies are shown here(which actually makes sense). For enabling the view of your GAC registered assembly do this <msdn_snip url = "http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B306149"> When you are developing a class library, you may want Visual Studio .NET to list your library in the Add Reference dialog box on the .NET tab without the user having to browse for it. This issue is not resolved if you install your assembly to the Global Assembly Cache (GAC), because the Add Reference dialog box is path-based and does not enumerate the components from the GAC. To display your assembly in the Add Reference dialog box, you can add a registry key, such as the following, which points to the location of the assembly [EMAIL PROTECTED]"C:\\MyAssemblies"where MyAssemblies is the name of the folder in which the assemblies reside. NOTE: You can create the this registry entry under the HKEY_LOCAL_MACHINE hive. This will change the setting for all of the users on the system. If you create this registry entry under HKEY_CURRENT_USER, this entry will affect the setting for only the current user. Restart Visual Studio .NET after you have added the key. </msdn_snip> b) Once that is done, you will see your assembly in the Add References Dialog Box. Select and add the reference. Then Choose that reference, and in the Properties Box, set the Copy Local to False. This will ensure that no local copy is maintained. Important : Do Note that when you set the copy local to false, then your GAC assembly will be picked up. In that case wherever you are referring to the assembly you need to refer it thru complete binding and not partial binding syntax. That is you need to specify the AssemblyName+ Version+ Culture+ PublicKeyToken. For example if you are placing any custom control assembly in the GAC(Im using the IE Web Controls as example for this), while referring to it in the aspx, if you specify it as <%@ Register TagPrefix="iewc" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls" %> you will get an error when you run the page(Bind Log Error saying that the assembly cannot be located). This is because "Copy Local=False" will ensure that local copy is not made and the GAC Version is used and for for binding to the assembly in GAC you need to use the complete Assembly Name So you should instead specify it as <%@ Register TagPrefix="iewc" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls, Version=1.0.2.226, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %> hth regards, sr ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/BDotNet/_emailsettings.msnw Need help? If you've forgotten your password, please go to Passport Member Services. http://groups.msn.com/_passportredir.msnw?ppmprop=help For other questions or feedback, go to our Contact Us page. http://groups.msn.com/contact If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. mailto:[EMAIL PROTECTED]
