473,402 Members | 2,072 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

How do you get a dll to see another dll in compilation?

I have a namespace called utility that I compiled using the /t:library
switch. It compiles fine. When I try to import it into a database
interface namespace, I get an error on compilation that says it's undefined
and then one that says the class has no public members or cannot be found.

Thanks,
Jim
May 23 '06 #1
6 1209
Is the utility dll located in the /bin directory of your application ?


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"JimO" <jo************@DEF-earthlink.net> wrote in message
news:_7****************@newsread2.news.pas.earthli nk.net...
I have a namespace called utility that I compiled using the /t:library
switch. It compiles fine. When I try to import it into a database
interface namespace, I get an error on compilation that says it's undefined
and then one that says the class has no public members or cannot be found.

Thanks,
Jim

May 24 '06 #2
Yes. I even placed the source code of the database module there just to see
if that would work.

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:u3**************@TK2MSFTNGP02.phx.gbl...
Is the utility dll located in the /bin directory of your application ?


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"JimO" <jo************@DEF-earthlink.net> wrote in message
news:_7****************@newsread2.news.pas.earthli nk.net...
I have a namespace called utility that I compiled using the /t:library
switch. It compiles fine. When I try to import it into a database
interface namespace, I get an error on compilation that says it's undefined and then one that says the class has no public members or cannot be found.
Thanks,
Jim


May 24 '06 #3
Source code placed in the /bin directory won't get compiled.

re:
When I try to import it into a database interface namespace,
I get an error on compilation that says it's undefined
How are you importing the namespace ?

The correct way to import a namespace in the page directive is :

<%@ Import Namespace="YourNameSpace" %>
Then, in your Page_Load, or any event handler, you can call any class in your namespace :

Sub Page_Load(Sender As Object, E As EventArgs)
Dim YourNewInstanceName as new YourClassName()
' rest of your code
End Sub


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"JimO" <jo************@DEF-earthlink.net> wrote in message
news:c9*****************@newsread4.news.pas.earthl ink.net... Yes. I even placed the source code of the database module there just to see
if that would work.

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:u3**************@TK2MSFTNGP02.phx.gbl...
Is the utility dll located in the /bin directory of your application ?


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"JimO" <jo************@DEF-earthlink.net> wrote in message
news:_7****************@newsread2.news.pas.earthli nk.net...
>I have a namespace called utility that I compiled using the /t:library
> switch. It compiles fine. When I try to import it into a database
> interface namespace, I get an error on compilation that says it's undefined > and then one that says the class has no public members or cannot be found. >
> Thanks,
> Jim

May 24 '06 #4
I'm importing the utility namespace into another namespace called
TestDBInterface.
I can import it into the codebehind module fine, but I'd rather call it from
the database module. I'd like to be able to import using the same method
used to import other namespaces like system.io etc.. since I will probably
use the code in other programs. Here is what I'm trying to do...

utility.vb File... compiles fine

Namespace Utility

Public Class ValidationClass

Public Function

End Function

End Class

End Namespace
---------------------------------------------
testdbinterface.vb File...

Imports Utility

Namespace TestDBInterface

Public Class DBInterface
Public Sub InsertUser(User As Object)

Dim v As ValidationClass = New ValidationClass()
May 25 '06 #5
re:
Dim v As ValidationClass = New ValidationClass()
I have always instantiated my clesses using this syntax :
Dim YourNewInstanceName as new YourClassName()
Could you try using :

Dim v As New ValidationClass()

?


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"JimO" <jo************@DEF-earthlink.net> wrote in message
news:dv****************@newsread3.news.pas.earthli nk.net... I'm importing the utility namespace into another namespace called
TestDBInterface.
I can import it into the codebehind module fine, but I'd rather call it from
the database module. I'd like to be able to import using the same method
used to import other namespaces like system.io etc.. since I will probably
use the code in other programs. Here is what I'm trying to do...

utility.vb File... compiles fine

Namespace Utility

Public Class ValidationClass

Public Function

End Function

End Class

End Namespace
---------------------------------------------
testdbinterface.vb File...

Imports Utility

Namespace TestDBInterface

Public Class DBInterface
Public Sub InsertUser(User As Object)

Dim v As ValidationClass = New ValidationClass()
.
.
End Sub

End Class

End Namespace

When I compile the testdbinterface as a dll, the Imports Utility gives me a
warning that the namespace does not have any public members or it cannot be
found. When I try to instantiatea new object, I get an undefined error.

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:OH**************@TK2MSFTNGP05.phx.gbl...
Source code placed in the /bin directory won't get compiled.

re:
> When I try to import it into a database interface namespace,
> I get an error on compilation that says it's undefined


How are you importing the namespace ?

The correct way to import a namespace in the page directive is :

<%@ Import Namespace="YourNameSpace" %>
Then, in your Page_Load, or any event handler, you can call any class in

your namespace :

Sub Page_Load(Sender As Object, E As EventArgs)
Dim YourNewInstanceName as new YourClassName()
' rest of your code
End Sub


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"JimO" <jo************@DEF-earthlink.net> wrote in message
news:c9*****************@newsread4.news.pas.earthl ink.net...
> Yes. I even placed the source code of the database module there just to see > if that would work.
>
> "Juan T. Llibre" <no***********@nowhere.com> wrote in message
> news:u3**************@TK2MSFTNGP02.phx.gbl...
>> Is the utility dll located in the /bin directory of your application ?
>>
>>
>>
>>
>> Juan T. Llibre, asp.net MVP
>> aspnetfaq.com : http://www.aspnetfaq.com/
>> asp.net faq : http://asp.net.do/faq/
>> foros de asp.net, en español : http://asp.net.do/foros/
>> ===================================
>> "JimO" <jo************@DEF-earthlink.net> wrote in message
>> news:_7****************@newsread2.news.pas.earthli nk.net...
>> >I have a namespace called utility that I compiled using the /t:library
>> > switch. It compiles fine. When I try to import it into a database
>> > interface namespace, I get an error on compilation that says it's
> undefined
>> > and then one that says the class has no public members or cannot be
> found.
>> >
>> > Thanks,
>> > Jim



May 25 '06 #6
I tried it and I got the same error. ValidationClass() is not defined.
Juan T. Llibre wrote:
re:
Dim v As ValidationClass = New ValidationClass()


I have always instantiated my clesses using this syntax :
Dim YourNewInstanceName as new YourClassName()


Could you try using :

Dim v As New ValidationClass()

?


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"JimO" <jo************@DEF-earthlink.net> wrote in message
news:dv****************@newsread3.news.pas.earthli nk.net...
I'm importing the utility namespace into another namespace called
TestDBInterface.
I can import it into the codebehind module fine, but I'd rather call itfrom
the database module. I'd like to be able to import using the same method
used to import other namespaces like system.io etc.. since I will probably
use the code in other programs. Here is what I'm trying to do...

utility.vb File... compiles fine

Namespace Utility

Public Class ValidationClass

Public Function

End Function

End Class

End Namespace
---------------------------------------------
testdbinterface.vb File...

Imports Utility

Namespace TestDBInterface

Public Class DBInterface
Public Sub InsertUser(User As Object)

Dim v As ValidationClass = New ValidationClass()
.
.
End Sub

End Class

End Namespace

When I compile the testdbinterface as a dll, the Imports Utility gives me a
warning that the namespace does not have any public members or it cannot be
found. When I try to instantiatea new object, I get an undefined error.

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:OH**************@TK2MSFTNGP05.phx.gbl...
Source code placed in the /bin directory won't get compiled.

re:
> When I try to import it into a database interface namespace,
> I get an error on compilation that says it's undefined

How are you importing the namespace ?

The correct way to import a namespace in the page directive is :

<%@ Import Namespace="YourNameSpace" %>
Then, in your Page_Load, or any event handler, you can call any class in

your namespace :

Sub Page_Load(Sender As Object, E As EventArgs)
Dim YourNewInstanceName as new YourClassName()
' rest of your code
End Sub


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"JimO" <jo************@DEF-earthlink.net> wrote in message
news:c9*****************@newsread4.news.pas.earthl ink.net...
> Yes. I even placed the source code of the database module there just to

see
> if that would work.
>
> "Juan T. Llibre" <no***********@nowhere.com> wrote in message
> news:u3**************@TK2MSFTNGP02.phx.gbl...
>> Is the utility dll located in the /bin directory of your application ?
>>
>>
>>
>>
>> Juan T. Llibre, asp.net MVP
>> aspnetfaq.com : http://www.aspnetfaq.com/
>> asp.net faq : http://asp.net.do/faq/
>> foros de asp.net, en español : http://asp.net.do/foros/
>> ===================================
>> "JimO" <jo************@DEF-earthlink.net> wrote in message
>> news:_7****************@newsread2.news.pas.earthli nk.net...
>> >I have a namespace called utility that I compiled using the /t:library
>> > switch. It compiles fine. When I try to import it into a database
>> > interface namespace, I get an error on compilation that says it's
> undefined
>> > and then one that says the class has no public members or cannot be
> found.
>> >
>> > Thanks,
>> > Jim



May 26 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: konf | last post by:
Hallo, I tried to compile PGSQL 7.4 and I got error (durring make): ar: command not found What is it? Whe I can found it? I have: $ uname -a SunOS ... 5.8 Generic_108528-03 sun4u sparc...
10
by: Sune | last post by:
Hi, previously I used Eclipse CDT for compiling my files just to get started with C and leave C++ behind. Now it's time to get a little more serious so I've moved my files to a new workplace and...
2
by: FireStarter | last post by:
Guys, in the code that follows, why does the method F() still compile, even if DBG is undefined? Inside method G(), the code inside <#if DBG> does not compile (notice that I can write whatever I...
3
by: Dan | last post by:
Hi, I have a problem using an aspx page with a Control on it. I get the following error message Compiler Error Message: CS1595: 'Test.Class2' is defined in multiple places; using definition...
3
by: ktrvnbq02 | last post by:
Hi, We have an ASP.NET application built in Release mode via Visual Studio. All of the C# code is in the code-behind files (i.e. *.aspx.cs files) and there is no C# in the *.aspx files...
6
by: thomson | last post by:
Hi all, I have compiled by .net web applicaion in my local machine , and a dll has been created on the bin Directory, And i have copied the entire application using xcopy deployment to a...
3
by: Robert | last post by:
I have a number of web projects converted from 1.1 to 2.0 in VS2005. I am methodically seeing the error below: The element 'compilation' has invalid child element 'compilers'. List of...
6
by: alban | last post by:
Hello I have got some problems of compilation on a AIX IBM, I use the XLC compilator (And I can't install another one). I try to compile code Pro*c ".pc" (oracle), I need do a pre-compilation...
4
by: Bob | last post by:
Hi, In VS2003 conditional compilation constants and their state could be defined at project level. I was using this to control what features where offered by various builds. i.e....
35
by: mwelsh1118 | last post by:
Why doesn't C# allow incremental compilation like Java? Specifically, in Java I can compile single .java files in isolation. The resulting individual .class files can be grouped into .jar files....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.