473,388 Members | 1,352 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,388 software developers and data experts.

VB.Net not building added file

I am using VB.Net 2003 and have added an existing file to my project but
can't seem to get the file to compile and my other file is getting errors
when refering to it.

The file starts out:
************************************************** *****
Imports System
Imports System.Data
Imports System.Data.SqlClient

Namespace MyFunctions

' DbObject is the class from which all classes in the Data Services Tier
' inherit. The core functionality of establishing a connection with the
' database and executing simple stored procedures is also provided by
' this base class.
' ---
Public Class DbObject
************************************************** ******

The file has "MyFunctions" as its' namespace and DbObject as the class.

But in my main file I have the following:

************************************************** ********
Imports System.Threading
Imports System.Data
Imports System.Data.SqlClient
Imports System.IO
Imports FtsData
Imports MyFunctions

Module Module1
Dim SqlConnection1 As SqlConnection
Public debugging As Boolean = True
Dim strProgress As String
Dim mutexFile As Mutex
Dim strErrors As String
Dim newPosition As Position
Dim myDbObject As New DbObject
************************************************** ****

I get the errors:

Namespace or type 'MyFunctions' for the Imports 'MyFunctions' cannot be
found.
Type 'DbObject' is not defined.

Why is this? Why won't it build the added file?

Thanks,

Tom


Jun 6 '07 #1
4 1195
My mistake.

The file is being built. I looked at the bin folder and found DbObject.dll
there.

What was happening was that I still had to manually add a reference to it.
I would have thought that if the project was building the .dll, it would
automatically know about the reference. Apparently I was wrong there.

Definately not intuitive.

Tom

"tshad" <t@home.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>I am using VB.Net 2003 and have added an existing file to my project but
can't seem to get the file to compile and my other file is getting errors
when refering to it.

The file starts out:
************************************************** *****
Imports System
Imports System.Data
Imports System.Data.SqlClient

Namespace MyFunctions

' DbObject is the class from which all classes in the Data Services Tier
' inherit. The core functionality of establishing a connection with the
' database and executing simple stored procedures is also provided by
' this base class.
' ---
Public Class DbObject
************************************************** ******

The file has "MyFunctions" as its' namespace and DbObject as the class.

But in my main file I have the following:

************************************************** ********
Imports System.Threading
Imports System.Data
Imports System.Data.SqlClient
Imports System.IO
Imports FtsData
Imports MyFunctions

Module Module1
Dim SqlConnection1 As SqlConnection
Public debugging As Boolean = True
Dim strProgress As String
Dim mutexFile As Mutex
Dim strErrors As String
Dim newPosition As Position
Dim myDbObject As New DbObject
************************************************** ****

I get the errors:

Namespace or type 'MyFunctions' for the Imports 'MyFunctions' cannot be
found.
Type 'DbObject' is not defined.

Why is this? Why won't it build the added file?

Thanks,

Tom


Jun 6 '07 #2
On Jun 6, 1:34 pm, "tshad" <t...@home.comwrote:
My mistake.

The file is being built. I looked at the bin folder and found DbObject.dll
there.

What was happening was that I still had to manually add a reference to it.
I would have thought that if the project was building the .dll, it would
automatically know about the reference. Apparently I was wrong there.

Definately not intuitive.

Tom

"tshad" <t...@home.comwrote in message

news:%2****************@TK2MSFTNGP02.phx.gbl...
I am using VB.Net 2003 and have added an existing file to my project but
can't seem to get the file to compile and my other file is getting errors
when refering to it.
The file starts out:
************************************************** *****
Imports System
Imports System.Data
Imports System.Data.SqlClient
Namespace MyFunctions
' DbObject is the class from which all classes in the Data Services Tier
' inherit. The core functionality of establishing a connection with the
' database and executing simple stored procedures is also provided by
' this base class.
' ---
Public Class DbObject
************************************************** ******
The file has "MyFunctions" as its' namespace and DbObject as the class.
But in my main file I have the following:
************************************************** ********
Imports System.Threading
Imports System.Data
Imports System.Data.SqlClient
Imports System.IO
Imports FtsData
Imports MyFunctions
Module Module1
Dim SqlConnection1 As SqlConnection
Public debugging As Boolean = True
Dim strProgress As String
Dim mutexFile As Mutex
Dim strErrors As String
Dim newPosition As Position
Dim myDbObject As New DbObject
************************************************** ****
I get the errors:
Namespace or type 'MyFunctions' for the Imports 'MyFunctions' cannot be
found.
Type 'DbObject' is not defined.
Why is this? Why won't it build the added file?
Thanks,
Tom
If you have the source code for the .dll, dont reference the .dll
directly, instead reference the project. That is the preferred
method.

Chris

Jun 7 '07 #3

"Chris Dunaway" <du******@gmail.comwrote in message
news:11*********************@p47g2000hsd.googlegro ups.com...
On Jun 6, 1:34 pm, "tshad" <t...@home.comwrote:
>My mistake.

The file is being built. I looked at the bin folder and found
DbObject.dll
there.

What was happening was that I still had to manually add a reference to
it.
I would have thought that if the project was building the .dll, it would
automatically know about the reference. Apparently I was wrong there.

Definately not intuitive.

Tom

"tshad" <t...@home.comwrote in message

news:%2****************@TK2MSFTNGP02.phx.gbl...
>I am using VB.Net 2003 and have added an existing file to my project but
can't seem to get the file to compile and my other file is getting
errors
when refering to it.
The file starts out:
************************************************** *****
Imports System
Imports System.Data
Imports System.Data.SqlClient
Namespace MyFunctions
' DbObject is the class from which all classes in the Data Services
Tier
' inherit. The core functionality of establishing a connection with
the
' database and executing simple stored procedures is also provided by
' this base class.
' ---
Public Class DbObject
************************************************** ******
The file has "MyFunctions" as its' namespace and DbObject as the class.
But in my main file I have the following:
************************************************** ********
Imports System.Threading
Imports System.Data
Imports System.Data.SqlClient
Imports System.IO
Imports FtsData
Imports MyFunctions
Module Module1
Dim SqlConnection1 As SqlConnection
Public debugging As Boolean = True
Dim strProgress As String
Dim mutexFile As Mutex
Dim strErrors As String
Dim newPosition As Position
Dim myDbObject As New DbObject
************************************************** ****
I get the errors:
Namespace or type 'MyFunctions' for the Imports 'MyFunctions' cannot be
found.
Type 'DbObject' is not defined.
Why is this? Why won't it build the added file?
Thanks,
Tom

If you have the source code for the .dll, dont reference the .dll
directly, instead reference the project. That is the preferred
method.
How do you reference the probject?

When you add a reference - you need to point at a .dll? I don't believe you
can reference the project.

Thanks,

Tom
Chris

Jun 7 '07 #4
On Jun 7, 4:00 pm, "tshad" <t...@home.comwrote:
"Chris Dunaway" <dunaw...@gmail.comwrote in message

news:11*********************@p47g2000hsd.googlegro ups.com...
On Jun 6, 1:34 pm, "tshad" <t...@home.comwrote:
My mistake.
The file is being built. I looked at the bin folder and found
DbObject.dll
there.
What was happening was that I still had to manually add a reference to
it.
I would have thought that if the project was building the .dll, it would
automatically know about the reference. Apparently I was wrong there.
Definately not intuitive.
Tom
"tshad" <t...@home.comwrote in message
>news:%2****************@TK2MSFTNGP02.phx.gbl...
I am using VB.Net 2003 and have added an existing file to my project but
can't seem to get the file to compile and my other file is getting
errors
when refering to it.
The file starts out:
************************************************** *****
Imports System
Imports System.Data
Imports System.Data.SqlClient
Namespace MyFunctions
' DbObject is the class from which all classes in the Data Services
Tier
' inherit. The core functionality of establishing a connection with
the
' database and executing simple stored procedures is also provided by
' this base class.
' ---
Public Class DbObject
************************************************** ******
The file has "MyFunctions" as its' namespace and DbObject as the class.
But in my main file I have the following:
************************************************** ********
Imports System.Threading
Imports System.Data
Imports System.Data.SqlClient
Imports System.IO
Imports FtsData
Imports MyFunctions
Module Module1
Dim SqlConnection1 As SqlConnection
Public debugging As Boolean = True
Dim strProgress As String
Dim mutexFile As Mutex
Dim strErrors As String
Dim newPosition As Position
Dim myDbObject As New DbObject
************************************************** ****
I get the errors:
Namespace or type 'MyFunctions' for the Imports 'MyFunctions' cannot be
found.
Type 'DbObject' is not defined.
Why is this? Why won't it build the added file?
Thanks,
Tom
If you have the source code for the .dll, dont reference the .dll
directly, instead reference the project. That is the preferred
method.

How do you reference the probject?

When you add a reference - you need to point at a .dll? I don't believe you
can reference the project.

Thanks,

Tom
Chris
When you add a reference, choose the Projects tab and reference the
project directly. Here's an older article that discusses the
advantages of referencing the project. Obviously, if you don't have
the project and only have a .dll, you have to reference the .dll.

This link is from Chapter 4, Managing Dependencies

http://msdn2.microsoft.com/en-us/library/ms998215.aspx

Chris
Jun 8 '07 #5

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

Similar topics

1
by: Lise | last post by:
Hi all .. I have a directory with several subdirectories and a number of files in each. These files are accessed by going to a web page and clicking in a listbox and navigating to the desired...
4
by: Steve Jorgensen | last post by:
A while ago, I posted a 1/2 formed idea for what was probably an overcomplicated scheme for improving how we create content using the DOM API. Since then, I've been refactoring some real-world code...
7
by: MLH | last post by:
Building Applications with Microsoft Access 97 is a publication I think I need. Is it available in book form? Is MicroSoft the sole vendor? Anybody got a copy they wanna sell???
4
by: brian | last post by:
Hello, I have spen hours trying to find information on dynamically building a table from an array. What I need: I have an array pulling file paths from a directory using a For Next Loop. F is...
13
by: royaltiger | last post by:
I am trying to copy the inventory database in Building Access Applications by John L Viescas but when i try to run the database i get an error in the orders form when i click on the allocate...
1
by: Simon Verona | last post by:
This may be slightly off-topic for this group, but I hope that somebody can give me a pointer. I'm building an installation project for my vb.net application, which I want to install a third...
22
by: James Stroud | last post by:
Hello All, This is annoying. I am trying to build scipy right now but every .so file requires my adding "-lpython2.5 -lpthread -lm -lutil -ldl -shared" to the ld flags. Main Question: When...
3
by: Bev in TX | last post by:
I am a complete newbie at building Python. I am trying to build it under MS Windows Vista (64-bit AMD) with MS VS2005. I'm doing that because I need debug libraries, which I did not see in the...
7
Curtis Rutland
by: Curtis Rutland | last post by:
Building A Silverlight (2.0) Multi-File Uploader All source code is C#. VB.NET source is coming soon. Note: This project requires Visual Studio 2008 SP1 or Visual Web Developer 2008 SP1 and...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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
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
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
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...

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.