473,480 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Compiling VB (.NET) files located in different directories

AA
Hi,
I am having to vb files. One is located under C:/VB/main and the other
is under C:/VB/class.
File under main looks like:

<code>
Module Module1
Sub Main()

Dim test As New Test1

End Sub

End Module
</code>
The class Test1 is defined in the file (class_test.vb) under class
directory. When I compile the code, I get an error saying Test1 is not
defined. This is because class_test.vb is located in some other
directory.
Any idea how this can be resolved? I want to main the directory
structure.

Regards,
P

Jul 26 '06 #1
4 2984
AA,

Use your Solution Explorer to create folders and don't use Window Explorer
for that.

Use the same Solution Explorer to move your classes inside that.

If you have done it with Windows Explorer than click in top of Solution
Explorer the icon Show all files.
Than include the folders etc. what you need. Don't include things as the Bin
and Obj folder because than it is in use and can't make builds anymore in
it.

I hope this helps,
Cor

"AA" <pu*****@gmail.comschreef in bericht
news:11*********************@75g2000cwc.googlegrou ps.com...
Hi,
I am having to vb files. One is located under C:/VB/main and the other
is under C:/VB/class.
File under main looks like:

<code>
Module Module1
Sub Main()

Dim test As New Test1

End Sub

End Module
</code>
The class Test1 is defined in the file (class_test.vb) under class
directory. When I compile the code, I get an error saying Test1 is not
defined. This is because class_test.vb is located in some other
directory.
Any idea how this can be resolved? I want to main the directory
structure.

Regards,
P

Jul 26 '06 #2
AA
It worked, great!!!
I have one more question: Like in C, for every file we get an .obj
created. All these object files then get linked to the final dll/exe.
Is there a similar process in VB.NET? What I mean by this is; is there
a way that I can build each folder individually and then combine
everything to get my final exe?

Regards,
AA

Cor Ligthert [MVP] wrote:
AA,

Use your Solution Explorer to create folders and don't use Window Explorer
for that.

Use the same Solution Explorer to move your classes inside that.

If you have done it with Windows Explorer than click in top of Solution
Explorer the icon Show all files.
Than include the folders etc. what you need. Don't include things as the Bin
and Obj folder because than it is in use and can't make builds anymore in
it.

I hope this helps,
Cor

"AA" <pu*****@gmail.comschreef in bericht
news:11*********************@75g2000cwc.googlegrou ps.com...
Hi,
I am having to vb files. One is located under C:/VB/main and the other
is under C:/VB/class.
File under main looks like:

<code>
Module Module1
Sub Main()

Dim test As New Test1

End Sub

End Module
</code>
The class Test1 is defined in the file (class_test.vb) under class
directory. When I compile the code, I get an error saying Test1 is not
defined. This is because class_test.vb is located in some other
directory.
Any idea how this can be resolved? I want to main the directory
structure.

Regards,
P
Jul 26 '06 #3
AA,

It is better to place for every question a seperate message. Now I am
probably only answering and maybe there are some who can give a better
answer. However,

You can create libararys (DLL) and use those in your programs.
Project->Add References -browse and than point to the created DLL

You can as well add those libarary projects to your VB project just as you
want and than is the reference.
Project-Add References -Projects

I hope this helps,

Cor

"AA" <pu*****@gmail.comschreef in bericht
news:11**********************@s13g2000cwa.googlegr oups.com...
It worked, great!!!
I have one more question: Like in C, for every file we get an .obj
created. All these object files then get linked to the final dll/exe.
Is there a similar process in VB.NET? What I mean by this is; is there
a way that I can build each folder individually and then combine
everything to get my final exe?

Regards,
AA

Cor Ligthert [MVP] wrote:
>AA,

Use your Solution Explorer to create folders and don't use Window
Explorer
for that.

Use the same Solution Explorer to move your classes inside that.

If you have done it with Windows Explorer than click in top of Solution
Explorer the icon Show all files.
Than include the folders etc. what you need. Don't include things as the
Bin
and Obj folder because than it is in use and can't make builds anymore in
it.

I hope this helps,
Cor

"AA" <pu*****@gmail.comschreef in bericht
news:11*********************@75g2000cwc.googlegro ups.com...
Hi,
I am having to vb files. One is located under C:/VB/main and the other
is under C:/VB/class.
File under main looks like:

<code>
Module Module1
Sub Main()

Dim test As New Test1

End Sub

End Module
</code>
The class Test1 is defined in the file (class_test.vb) under class
directory. When I compile the code, I get an error saying Test1 is not
defined. This is because class_test.vb is located in some other
directory.
Any idea how this can be resolved? I want to main the directory
structure.

Regards,
P

Jul 26 '06 #4
AA
Yes, it did help a lot. I created a class library, built a dll from
that and added that in Project->References. In my main.vb, I am
instantiating object of that class (embedded in the dll) as
Dim class_object As DllName.ClassName

thanks a lot for your help.
AA
Cor Ligthert [MVP] wrote:
AA,

It is better to place for every question a seperate message. Now I am
probably only answering and maybe there are some who can give a better
answer. However,

You can create libararys (DLL) and use those in your programs.
Project->Add References -browse and than point to the created DLL

You can as well add those libarary projects to your VB project just as you
want and than is the reference.
Project-Add References -Projects

I hope this helps,

Cor

"AA" <pu*****@gmail.comschreef in bericht
news:11**********************@s13g2000cwa.googlegr oups.com...
It worked, great!!!
I have one more question: Like in C, for every file we get an .obj
created. All these object files then get linked to the final dll/exe.
Is there a similar process in VB.NET? What I mean by this is; is there
a way that I can build each folder individually and then combine
everything to get my final exe?

Regards,
AA

Cor Ligthert [MVP] wrote:
AA,

Use your Solution Explorer to create folders and don't use Window
Explorer
for that.

Use the same Solution Explorer to move your classes inside that.

If you have done it with Windows Explorer than click in top of Solution
Explorer the icon Show all files.
Than include the folders etc. what you need. Don't include things as the
Bin
and Obj folder because than it is in use and can't make builds anymore in
it.

I hope this helps,
Cor

"AA" <pu*****@gmail.comschreef in bericht
news:11*********************@75g2000cwc.googlegrou ps.com...
Hi,
I am having to vb files. One is located under C:/VB/main and the other
is under C:/VB/class.
File under main looks like:

<code>
Module Module1
Sub Main()

Dim test As New Test1

End Sub

End Module
</code>
The class Test1 is defined in the file (class_test.vb) under class
directory. When I compile the code, I get an error saying Test1 is not
defined. This is because class_test.vb is located in some other
directory.
Any idea how this can be resolved? I want to main the directory
structure.

Regards,
P
Jul 26 '06 #5

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

Similar topics

2
1396
by: Mathias | last post by:
How do I show files from different directories as the Windows Search function does in a VB.NET application. Have already found the files that I graphically wants to display in Windows Explorer!...
3
1976
by: dave | last post by:
I am using vs.net 2003 on windows xp. After clicking on a project within my solution and selecting create new folder vs.net responds back with , the "directory already exists". If i look at the...
1
1739
by: Victor Spång Arthursson | last post by:
Well, bought a new disk to my Powerbook yesterday and reinstalled Mac OS X. I'm in the middle of restoring everything now, and need to know where the database files where located. I thougt...
2
9066
by: John Saunders | last post by:
I deploy web applications in what may be an odd manner. For every web site "x", I have an "x2" web site which points to an empty directory. I can then use Copy Project in VS.NET to deploy to the...
0
858
by: pukya78 | last post by:
Hi, I am having to vb files. One is located under C:/VB/main and the other is under C:/VB/class. File under main looks like: <code> Module Module1 Sub Main() Dim test As New Test1
2
1981
by: Angelo Cook | last post by:
how do you prevent the publishing of virtual directories in VS 2005. I have been using VS2003 and developing websites for years. I have been using virtual directories for images, icons, styles...
1
1265
by: archana | last post by:
Hi all, I am new to asp.net. I don't know exact purpose of 'temporary ASP.NEt Files' folder. I have one web application with only one form with name as webform1. What i observed it when i run...
0
2065
by: tomPee | last post by:
Hi, I have no idea if this is the right section to post this in. But i thought it maybe belonged here most. The problem i having is actually, most likely really simple. But here i am running...
0
1517
by: Baileyboo936 | last post by:
Hi I am looking for some help with my code. I am very new to Visual Basic .Net. What I am trying to do is have a button that will allow me to select the directory and the files that I want to...
0
6908
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...
1
6737
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
6921
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
5336
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,...
1
4776
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...
0
4481
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2984
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
563
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
179
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.