How to reference a dll from asmx?

Discussion in 'ASP .Net Web Services' started by Michael Giroux, Nov 10, 2005.

  1. I have an asmx that Inherits a class that is defined in a dll. The asmx and
    dll are in the same directory. The asmx gets compile errors because the
    class it inherits is not know. Looking at the generated compile command,
    the dll is not being referenced -- there is no /R:my.dll option in the
    command line.

    I've been searching for several hours but cannot figure out how to cause
    ASP.NET to include a /r:mydll in the compile.

    Can someone point me to the docs for how to accomplish this?

    Thanks

    Michael Giroux
     
    Michael Giroux, Nov 10, 2005
    #1
    1. Advertising

  2. Michael Giroux

    Martin Kulov Guest

    "Michael Giroux" <> wrote in message
    news:...
    >
    > I've been searching for several hours but cannot figure out how to cause
    > ASP.NET to include a /r:mydll in the compile.
    >
    > Can someone point me to the docs for how to accomplish this?


    Hi Michael,

    use the @ Assembly directive. I think it does exactly what you need.

    Best,

    --
    Martin Kulov
    http://www.codeattest.com/blogs/martin

    MCAD Charter Member
    MCSD.NET Early Achiever
    MCSD
     
    Martin Kulov, Nov 11, 2005
    #2
    1. Advertising

  3. Martin,


    > use the @ Assembly directive. I think it does exactly what you need.


    Thanks. You are correct, the @Assembly directive is exactly what I needed
    but it has one hitch that I'm not sure how to resolve.

    If the code in the DLL does not have a namespace, there I cannot figure out
    how to reference a DLL. I am able to reference the code as xxx.vb source
    file, but when I compile the code into a DLL and reference as a dll, then
    the ASMX fails to compile because the referenced class is not found.

    Is there something special about using @Assembly with the default namespace?

    Michael
     
    Michael Giroux, Nov 15, 2005
    #3
  4. Michael Giroux

    Martin Kulov Guest

    "Michael Giroux" <> wrote in message
    news:...
    > If the code in the DLL does not have a namespace, there I cannot figure
    > out how to reference a DLL. I am able to reference the code as xxx.vb
    > source file, but when I compile the code into a DLL and reference as a
    > dll, then the ASMX fails to compile because the referenced class is not
    > found.


    Michael,
    please use Object browser to see what is your namespace in the compiled dll.
    I have some doubts that it is not empty. Can you check it, please?


    --
    Martin Kulov
    http://www.codeattest.com/blogs/martin

    MCAD Charter Member
    MCSD.NET Early Achiever
    MCSD
     
    Martin Kulov, Nov 22, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Anushi
    Replies:
    5
    Views:
    8,863
  2. John
    Replies:
    6
    Views:
    673
  3. asptodotnet
    Replies:
    1
    Views:
    433
    Daniel Fisher\(lennybacon\)
    Nov 18, 2004
  4. Craig G
    Replies:
    1
    Views:
    467
    William F. Robertson, Jr.
    Dec 6, 2004
  5. H. Simpson
    Replies:
    4
    Views:
    308
    H. Simpson
    Aug 3, 2004
Loading...

Share This Page