Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GAC + vn.net namespace

Status
Not open for further replies.

boro2g

Programmer
Apr 29, 2005
8
GB
I am trying to create a shared dll which can be used for error reporting on each site i am running.

I have created a keypair (sn.exe) and built my code within a namespace (including the key) This verifies ok (with -v flag)

Using gacutil on the server, i have 'installed' the dll to c:\winnt\assembly.

I then updated the machine.config file to include assembly reference to the version, pub key & dll name

Finally i have imported the new namespace into my global.asax file.

During compilation of the page the dll is compiled ok (/R:"c:\winnt\assembly\gac\errorlogger\1.0.1.0__536e45393d6c8605\errorlogger.dll")

However i still get the error:
global.asax(37) : error BC30002: Type 'logClass' is not defined.
Dim vl_logger As logClass

My code begins:

NameSpace errorLogger
Public Class logClass
...


Have i assembled the code incorrectly, or configured the server wrong?

Many thanks in advance if anyone can help out!
 
Possibly stupid question - did you set a reference to it? Once it's in the GAC, it should appear on the first tab of the references dialog.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
I have imported the namespace to my global.asax file (
did you set a reference to it
)

By the references dialog, do you mean in the assembly folder ? (if so, yeah, it appears in there ok, along with reference to version no and public key value)

When the page loads, it imports the namespace ok <%@ Import Namespace="errorLogger" %>
, it is when it makes a reference to the class logClass from my asax page that it returns 'logClass' not defined.

Cheers
boro
 
I have found the problem - v annoying!!!

by declaring the project within a namespace, the reference to it from asax file needed errorLogger.errorLogger.logClass

Not ideal, but it seems to work now
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top