|
-
Aug 14th, 2002, 08:33 AM
#1
Thread Starter
New Member
Deploying a Class Library (.dll) to the GAC *RESOLVED*
I created a .dll called DataAccess.dll with a strong name and have successfully added it to the GAC using the gacutil (gacutil /i d:\DataAccess\DataAccess.dll)
I have also added an entry for this program under the assemblies section of the machine.config file like so:
…<assemblies>
…
<add assembly="DataAccess, Version=1.0.954.23066, Culture=neutral, PublicKeyToken=541ca2b7bdb7a906" />
…
</assemblies>
…
When I attempt to run my .exe with the DataAccess.dll deployed in the same directory as the .exe it works fine. When I attempt to run the .exe without DataAccess.dll in the directory, it is in d:\DataAccess and registered in the GAC, I get this error: “File or assembly name DataAccess, or one of its dependencies, was not found”
The other program that will use DataAccess.dll is an ASP.NET page. Compiled debug it shows the paths it is searching for this file, they are all project related directories (ex. d:/inetpub/wwwroot/SPGen/bin/DataAccess.dll).
Any ideas what I’ve done incorrectly?
Thanks
Brad
Last edited by foot; Aug 15th, 2002 at 09:34 AM.
-
Aug 14th, 2002, 08:49 AM
#2
hmm only thing I cna think of it to check c:\winnt\assembly in Windows Explorer and make sure your dll is listedd
-
Aug 14th, 2002, 09:24 AM
#3
Thread Starter
New Member
I double checked winnt\assembly and my dll is listed there and the codebase property shows the correct path to my dll.
-
Aug 14th, 2002, 08:01 PM
#4
Frenzied Member
Hey foot, make sure you add a reference to the dll.
Dont gain the world and lose your soul
-
Aug 15th, 2002, 08:51 AM
#5
Thread Starter
New Member
I do have a reference to the dll. Do I need to add the reference differently for a GAC dll?
-
Aug 15th, 2002, 09:04 AM
#6
no..it should be the same. Perhaps when you tested it with the dll that was local, you referenced that one so now when you are tyrying to use the one in the gac, it is still trying to read the original. Try removing the reference and add it again making sure you are refering to the one in the GAC.
-
Aug 15th, 2002, 09:34 AM
#7
Thread Starter
New Member
Figured it out. In Reference Path, under project properties, I needed to add c:\winnt\assembly.
Thanks, I appreciate your help.
Brad
-
Aug 15th, 2002, 09:36 AM
#8
cool. so it was trying to use the wrong reference.
Good luck.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|