open multiple existing projects in a new project

nishna

Member
Joined
Jan 17, 2008
Messages
19
Programming Experience
1-3
hi to all
is there any possible way to open multiple existing projects in a new project.
in this new project, the existing projects will be made to work with each other.
any reply would be greatly appreciated.

regards,
nishna
 
Yes, a solution can contain multiple projects and the solution explorer is designed to handle this (you can even specify which project is the "default" one by right clicking any of the projects listed in the solution explorer)

To add multiple projects, simply click File -> Add -> New Project/Existing project
 
hi again,...
im trying to load a main form from the second project. but im getting error...
any way to handle this problem?(i want to try another solution than COM)

regards,
nishna
 
Add Reference to the other assembly, this is valid both for class library projects and windows application projects. When the project has the reference it can import namespaces or fully qualify the object types. For example your other project is a class library with namespace 'classlib' and it has a 'formX':
VB.NET:
Dim x as new classlib.formX
or Imports:
VB.NET:
Imports classlib
'... then
dim x as new formX
The Imports can also be selected in References tab of project properties in order for importing namespaces into all classes in project, this is done for the common Framework namespaces.

I think this is what you mean because the other alternative is you have two independent running applications (yes, they can be developed within same solution) and use some kind of IPC functionality to communicate between them, like sockets or remoting etc. You can configure a solution containing multiple windows application projects for multiple startups when debugging.
 
in fact, i'm doing a multimodal biometric project which consists of merging other already separate individual existing projects in vb.net.
i opened all the different projects in 1 solution.

so by classlib, do you mean the main start up class in each project?

any suggestion/advice would be of great help, thanks


regards,nishna
 
'classlib' was example the namespace of the example Class Library project. As I said a Windows Application project are also a valid reference. The different projects all output to each their own assembly file when built, be it a .exe or .dll. What kind of project types you have I don't know, but as said this also doesn't matter much in regard to referencing them as using classes. If one of your other projects were a Windows Application you should mind that this is an executable a user may try to run when deployed even if this is not the main application executable, which may cause trouble for your application of you don't design carefully. Putting form classes and other classes in a class library would perhaps be better anyway, that is the purpose of this type of project, to be able to use common class functionality by different projects. Think about the Framework library, it consist of multiple class libraries with a lot of classes for various common functionality that can be used by us all when we develop different applications.
 
is there any way to convert whole window application project into a class library project?
because i have 3 different window application projects that need to be used in 1 solution explorer.

i have tried to use the referencing u mentioned above, but imports allowing me to call only the project that was built the the solution explorer. the other multiple projects added are not being imported!
 
is there any way to convert whole window application project into a class library project? because i have 3 different window application projects that need to be used in 1 solution explorer.
Yes, you can actually just change the project type in project properties, Application tab. (the Application type combo), and rebuild. If you change a Windows Application project type to a Class Library project type the built assembly will be a .dll file instead of .exe. But as said it is not a requirement to be able to reference one assembly from another. Assembly is assembly.
i have tried to use the referencing u mentioned above, but imports allowing me to call only the project that was built the the solution explorer. the other multiple projects added are not being imported!
I have no idea what you mean by that.
 
problem to reference a project converted to .net

hi again...

there a project which i have converted from vb 6.0 to vb.net,
but when i try to reference it... when typing the following piece of code ;

----------
Code:

Imports classlib
'... then
dim x as new formX
----------

i cant get the project namespace after 'imports'
for a project created it vb.net.. it works fine
any advice would be of great help
thnks
 
I think you should upload this project (the project you try to reference!), zip and attach, remember to remove the Bin and Obj folders containing the generated binaries.
 
hi again...

there a project which i have converted from vb 6.0 to vb.net,
but when i try to reference it... when typing the following piece of code ;

----------
Code:

Imports classlib
'... then
dim x as new formX
----------

i cant get the project namespace after 'imports'
for a project created it vb.net.. it works fine
any advice would be of great help
thnks

View attachment 1527

This is the .net version of the vb6 project which i've converted, but for which am nt able to get the namespace in the imports x code.

This project has namespace "Attendance", not "classlib". It also doesn't have a formX class.
 
im so sorry for all the confusion,
i have to type the following code:

imports attendance
dim x as new attendance.frmStart


the problem is that i can't get attendance in the list after typing 'imports'...
are you able to get the 'attendance' namespace?
since i don't get the namespace(attendance), i cant call the form frmStart als...
 

Latest posts

Back
Top