473,406 Members | 2,956 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,406 software developers and data experts.

Namespace Problem

I created an assembly called : getDataVB.dll and placed it in the bin
folder. The source file getData.vb looks like this:

Namespace chris.getData
Public Class dataObj
' my code
End Class
End Namespace

it compiles with no problems. I have a code behind file where I import this
namespace like this: Imports chris.getData
When I type this import statement, VS completes it automatically so I know
that it is properly registered. When I try to create a new instance of the
dataObj class like this: Dim dataObj as new DataObj I get the error message:
'dataObj' is ambiguous in the namespace 'chris.getData'. I have also added
this line to my web.config file: <add assembly="getDataVB"/>

I am using Visual Web Developer 2005 Express Edition Beta and compiling my
classes using vbc on the compiler version 1.1.4322.573.

Can anyone tell me what the problem might be?

Thanks
Jul 21 '05 #1
6 1183
It does exactly the same thing with vbc compiler version 2.0.40607.
"rufus" <he***@online.de> wrote in message news:ch**********@online.de...
I created an assembly called : getDataVB.dll and placed it in the bin
folder. The source file getData.vb looks like this:

Namespace chris.getData
Public Class dataObj
' my code
End Class
End Namespace

it compiles with no problems. I have a code behind file where I import this namespace like this: Imports chris.getData
When I type this import statement, VS completes it automatically so I know
that it is properly registered. When I try to create a new instance of the dataObj class like this: Dim dataObj as new DataObj I get the error message: 'dataObj' is ambiguous in the namespace 'chris.getData'. I have also added this line to my web.config file: <add assembly="getDataVB"/>

I am using Visual Web Developer 2005 Express Edition Beta and compiling my
classes using vbc on the compiler version 1.1.4322.573.

Can anyone tell me what the problem might be?

Thanks

Jul 21 '05 #2
Rufus,
It sounds like you included the getData.vb source file in your web project
as well as your class library project. It needs to be in only your class
library project.

Hope this helps
Jay

"rufus" <he***@online.de> wrote in message news:ch**********@online.de...
I created an assembly called : getDataVB.dll and placed it in the bin
folder. The source file getData.vb looks like this:

Namespace chris.getData
Public Class dataObj
' my code
End Class
End Namespace

it compiles with no problems. I have a code behind file where I import
this
namespace like this: Imports chris.getData
When I type this import statement, VS completes it automatically so I know
that it is properly registered. When I try to create a new instance of
the
dataObj class like this: Dim dataObj as new DataObj I get the error
message:
'dataObj' is ambiguous in the namespace 'chris.getData'. I have also
added
this line to my web.config file: <add assembly="getDataVB"/>

I am using Visual Web Developer 2005 Express Edition Beta and compiling my
classes using vbc on the compiler version 1.1.4322.573.

Can anyone tell me what the problem might be?

Thanks

Jul 21 '05 #3

"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:O3**************@TK2MSFTNGP12.phx.gbl...
Rufus,
It sounds like you included the getData.vb source file in your web project
as well as your class library project. It needs to be in only your class
library project.

Hope this helps
Jay


Thanks for your reply but I'm not sure that this is the problem. Visual
Webdeveloper doesn't seem to make projects and all class files must be
assembled from the command line.
Jul 21 '05 #4
rufus,
Is getData.vb in the same folder as your web application (the Code folder)?

If it is then it is automatically part web application you do not need to
use the command line to create an assembly.

Hence it sounds like you include the getData.vb source file in your web
project (application if you prefer) as well as your class library project
(assembled from the command line).

Hope this helps
Jay
"rufus" <he***@online.de> wrote in message news:ch**********@online.de...

"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:O3**************@TK2MSFTNGP12.phx.gbl...
Rufus,
It sounds like you included the getData.vb source file in your web
project
as well as your class library project. It needs to be in only your class
library project.

Hope this helps
Jay


Thanks for your reply but I'm not sure that this is the problem. Visual
Webdeveloper doesn't seem to make projects and all class files must be
assembled from the command line.

Jul 21 '05 #5
Doh!
If it is then it is automatically part web application you do not need to
use the command line to create an assembly. That should be:

If it is then it is automatically part of the web application you do not
need to use the command line to create an assembly.

Hope this helps
Jay

"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl... rufus,
Is getData.vb in the same folder as your web application (the Code
folder)?

If it is then it is automatically part web application you do not need to
use the command line to create an assembly.

Hence it sounds like you include the getData.vb source file in your web
project (application if you prefer) as well as your class library project
(assembled from the command line).

Hope this helps
Jay
"rufus" <he***@online.de> wrote in message news:ch**********@online.de...

"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:O3**************@TK2MSFTNGP12.phx.gbl...
Rufus,
It sounds like you included the getData.vb source file in your web
project
as well as your class library project. It needs to be in only your class
library project.

Hope this helps
Jay


Thanks for your reply but I'm not sure that this is the problem. Visual
Webdeveloper doesn't seem to make projects and all class files must be
assembled from the command line.


Jul 21 '05 #6

"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:e$**************@TK2MSFTNGP14.phx.gbl...
Doh!
If it is then it is automatically part web application you do not need to use the command line to create an assembly.

That should be:

If it is then it is automatically part of the web application you do not
need to use the command line to create an assembly.

Hope this helps
Jay


Thanks for your help Jay. It worked! I have always thought I needed a dll
sitting in the bin folder and Visual Studio normally creates one
automatically.
Jul 21 '05 #7

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

Similar topics

8
by: Marcin Kalicinski | last post by:
Is the code below ill formed (because operator >> is defined in different namespace than class B)? It fails with VS 2005 Beta. I don't know if I should redesign my code or if I should find a...
7
by: Kevin Newman | last post by:
I've been toying with a namespace manager, and wanted to get some input. So what do you think? if (typeof com == 'undefined') var com = {}; if (!com.unFocus) com.unFocus = {}; ...
5
by: Alexis | last post by:
Hello, I have a set of classes I created from schema files using the xsd.exe tool. I'm using namespaces in the clases ( I had to because I have some classes with the same name but not the same...
0
by: richwangler | last post by:
This problem should be easily reproducable if anybody has the time. I need to build the following XML programatically and decided to use the XMLSerializer. I simplified the XML (myExample.xml)...
5
by: Mike Oliszewski | last post by:
Given the following c# code: namespace Company2 { public class SomeFunctions { public void FunctionA() { // Do Something. }
10
by: anders | last post by:
I have 2 external assemblies A1 and A2 that both define class X in the global namespace. I need to use both assemblies in my VB project but the names X are ambiguous. How can I get around this...
4
by: Kevin Newman | last post by:
The primary problem I've had with php is the lack of namespaces, which makes OOP very difficult to organize, since you end up with large number of classes cluttering up the same namespace - which...
30
by: Pep | last post by:
Is it best to include the code "using namespace std;" in the source or should each keyword in the std namespace be qualified by the namespace tag, such as std::cout << "using std namespace" <<...
3
by: George | last post by:
I am currently developing an xbrl validation software that takes an xml instance file and a lot of schemas(xsd files) and validates it against the xsd files. I am using Visual basic in visual...
7
by: Armin Zingler | last post by:
Hi all, I have a Form called "Main": Public Class Main Private Sub Button1_Click( _ ByVal sender As System.Object, ByVal e As System.EventArgs) _ Handles Button1.Click
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
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,...

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.