file in GAC not usable in projects

file in GAC not usable in projects

Post by Sanjay Tibrewa » Sat, 04 Jan 2003 11:31:20



Hello,

I have created an abcLib.dll file that has common functions I want to use
across my projects. I created a key file using sn.exe, complied the project
using the key and installed the dll in global assembly using gacutil.exe /i
abcLib.dll. The file shows up under Winnt\assembly folder with key and
version. However when I try to use that from a codebehind page the Imports
statement does not show that library as a completion choice. If I go ahead
and add "Imports abcLib" anyways, the complier complains that it does not
know what that is referring to.

What step am I missing from being able to use that dll from GAC in my
projects?

Thanks for your help.
Sanjay.

 
 
 

file in GAC not usable in projects

Post by Ken Cox [Microsoft MVP » Sat, 04 Jan 2003 13:10:51


You might want to get a copy of the DLL and put it somewhere outside the GAC
for reference purposes at compile time. (Drop it into the /bin folder and Add a
Reference to it in VS.NET.)

At runtime, the application will go to the version in the GAC first.

Ken


Hello,

I have created an abcLib.dll file that has common functions I want to use
across my projects. I created a key file using sn.exe, complied the project
using the key and installed the dll in global assembly using gacutil.exe /i
abcLib.dll. The file shows up under Winnt\assembly folder with key and
version. However when I try to use that from a codebehind page the Imports
statement does not show that library as a completion choice. If I go ahead
and add "Imports abcLib" anyways, the complier complains that it does not
know what that is referring to.

What step am I missing from being able to use that dll from GAC in my
projects?

Thanks for your help.
Sanjay.

 
 
 

file in GAC not usable in projects

Post by Sanjay Tibrewa » Sun, 05 Jan 2003 01:59:50


Thank you Ken. That's my current workaround solution. I was expecting that
when I right click on "References" and click to add a reference, the
abcLib.dll would show up as a choice under the .NET tab just like other
system dlls show up there but it doesn't. Would you, or anyone else, know if
that is normal for a dll in GAC to not show up as a choice in the list of
dlls when adding a reference to a project? If that is true then how do you
actually make it show up there?

It just sounds counterintuitive that even if you have something in your GAC
you have to have its local copy to build a project that needs that dll. I
would expect it to behave like any other system dll.

Thanks for your thoughts and feedback.

Sanjay.



> You might want to get a copy of the DLL and put it somewhere outside the
GAC
> for reference purposes at compile time. (Drop it into the /bin folder and
Add a
> Reference to it in VS.NET.)

> At runtime, the application will go to the version in the GAC first.

> Ken



> Hello,

> I have created an abcLib.dll file that has common functions I want to use
> across my projects. I created a key file using sn.exe, complied the
project
> using the key and installed the dll in global assembly using gacutil.exe
/i
> abcLib.dll. The file shows up under Winnt\assembly folder with key and
> version. However when I try to use that from a codebehind page the Imports
> statement does not show that library as a completion choice. If I go ahead
> and add "Imports abcLib" anyways, the complier complains that it does not
> know what that is referring to.

> What step am I missing from being able to use that dll from GAC in my
> projects?

> Thanks for your help.
> Sanjay.

 
 
 

file in GAC not usable in projects

Post by Ken Cox [Microsoft MVP » Sun, 05 Jan 2003 10:08:30


Yes, it is odd that the DLL doesn't show up in the list, now that you mention
it. I've got stuff in there that I don't really want - leftovers from demos.


Thank you Ken. That's my current workaround solution. I was expecting that
when I right click on "References" and click to add a reference, the
abcLib.dll would show up as a choice under the .NET tab just like other
system dlls show up there but it doesn't. Would you, or anyone else, know if
that is normal for a dll in GAC to not show up as a choice in the list of
dlls when adding a reference to a project? If that is true then how do you
actually make it show up there?

It just sounds counterintuitive that even if you have something in your GAC
you have to have its local copy to build a project that needs that dll. I
would expect it to behave like any other system dll.

Thanks for your thoughts and feedback.

Sanjay.

 
 
 

1. .NET Add-ins in Excel do not show up in Add-ins

Has anyone been successful in adding custom built-in functions into
Excel via the .net XP Interop assemblies?

According to MS KB 316723, you have to make sure you build the
deployment project for the Current User, not the machine.  I did that.

Also, in the Add-in path for Excel, I added a string called "Automation"
(from a support call to Microsoft) ... but
alas ... no add-in after I install.

Anyone get this to work?

--mike

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

2. Seeking recomendations on automated testing publications

3. .NET Add-ins -> Setup project build problems

4. FS: HP200LX, charger, 2mb flashdisk, box/docs

5. Add-ins Not Firing?

6. What's included with purchase of OS/2 Beta?

7. Creating Office Managed COM Add-Ins with Visual Studio .NET

8. Outlook COM Add-ins With .NET

9. Writing MMC Snap-ins in VB.Net

10. ANN: using DirectX plug-ins (audio effects) in managed apps

11. Creating Office Add-ins with VB.NET

12. VS.NET add-ins events