VB.net 03, run one project from another

  • Thread starter Thread starter Guest
  • Start date Start date
I beleive I have tried that. I have tried adding any conceivable file form
the project as well as the application, and each one says no way.

RobinS said:
Wait! I have a revelation! I had a problem yesterday when trying to set a
reference from a windows forms application to a class in another project in
the solution.

Instead of creating the reference to the Project, build each of the
projects singly, then add a reference in your main project, and instead of
selecting the <Projects> tab and selecting the other project, choose Browse
and then browse to the [bin] folder of the other project, and debug, and
find the dll and select it.

Does that work?

Robin S.
---------------------------------
Dr. S. said:
 
Oddly, all of my projects and applications contain .exe files only. The one
I am currently working on is the only one that contains .dll files. ????

RobinS said:
Wait! I have a revelation! I had a problem yesterday when trying to set a
reference from a windows forms application to a class in another project in
the solution.

Instead of creating the reference to the Project, build each of the
projects singly, then add a reference in your main project, and instead of
selecting the <Projects> tab and selecting the other project, choose Browse
and then browse to the [bin] folder of the other project, and debug, and
find the dll and select it.

Does that work?

Robin S.
---------------------------------
Dr. S. said:
 
Okay, that's just frickin' weird. How big is the solution? Is it something
you can e-mail that I could look at quickly? If so, post your e-mail
address in a not-easily-understood-by-machines-way and I'll e-mail you.

Robin S.
------------------------------
Dr. S. said:
I beleive I have tried that. I have tried adding any conceivable file
form
the project as well as the application, and each one says no way.

RobinS said:
Wait! I have a revelation! I had a problem yesterday when trying to set
a
reference from a windows forms application to a class in another project
in
the solution.

Instead of creating the reference to the Project, build each of the
projects singly, then add a reference in your main project, and instead
of
selecting the <Projects> tab and selecting the other project, choose
Browse
and then browse to the [bin] folder of the other project, and debug, and
find the dll and select it.

Does that work?

Robin S.
---------------------------------
Dr. S. said:
Yes.

:

Are all three of them Windows Applications?

Robin S.
------------------------------------
I basically opened a new project, and added to it three exixting
projects,
which are threee programs which I now wish to package into one,
with a
new
single main menu to launch each program. If I am looking in the
right
place,
the output type under properties is a "windows application". Let
me
know
if
this helps.

:

I skipped 2003 and went straight to 2005, but I have one VB.Net
2003
book.
It looks like the references work the same way in both versions.

I don't think it matters, but what is the project type of your
main
project? If you bring up the project properties and go to the
Application
tab, what is the Application type?

Are you using the Projects tab under the References? It shouldn't
require a
DLL. Maybe you can tell me specifically what you're doing, because
it
doesn't sound like you're doing the right thing.

Robin S.
-------------------------
Happy Easter.

Yes, I am using VB.net 2003. I did build each added project
prior
to
adding
them. these are currently functional programs, which I now wish
to
combine
into one big program. But when I add the reference, I get the
message
that
it must be a dll not an exe. I understand this was addressed in
v2005,
but I
remain unclear as how to handle this in v2003.

:


I understand your frustration. I read a lot of books when I was
learning
..Net, and sometimes you have to read a lot to get the exact
information
you
need, and you don't always have the time to do that.

First, you have all three projects under the same solution,
right?

How are you adding the reference? It should have tabs for
selecting
your
reference, something like ".Net, COM, Projects, ..." If you
look
under
Projects, it should show the other projects in your solution.

If you've never done a Build on those projects, you probably
need
to,
in
order for it to reference them. And remember that you will have
to
Build
those before using them if you change them. (Just right-click
on
the
project and choose Build).

For example, I have a business layer that has a bunch of
business
objects
defined. To see changes to one of the business objects in my UI
layer,
w/o
building the entire solution, I do a build on teh business
layer
project,
and then I can see the changes from my UI layer.

Does that help?

BTW, you're doing VB, right?

Robin S.
--------------------------------------
Robin, Thanks you so much for your assistance and actually
helping
to
answer
my questions rather than informing me where I can do research
on
the
topic.
Unfortunately, I have tried that, and I get an error message
that
the
file
must have a dll extenstion in order to be refereneced. I
have
actually
done
some reading on this, however, not being a programmer by
trade,
I
have
great
difficulty.

Please advise, and thanks again.

:

You need to pick one of the projects to be the main one,
i.e.
the
first
launched. Then you add a reference to that project for the
other
two
projects. To do that, go to the properties for the main
project
and
click
on the References tab, click on the Add button, select the
Projects
tab,
and pick the other two projects. After you add them, you
might
want
to
check the Imported Namespaces and click the checkboxes. This
imports
the
namespaces for you, so you don't have to reference them as
myOtherProject.MyOtherForm.

When you do that, Then you can access the forms in the other
projects
from
the main project, and open them or whatever it is you want
to
do
with
them.

Good luck.
Robin S.
------------------------------------------
When you add the reference, if you
Well, I have spent a significant amount of time, which I
don't
have,
reading
up on these topics to find answers, which I have not. It
seems
that
in
seven
emails, you could have been of some minimal assistance at
best
here,
which
you have not, rather than using the communications to make
sarcastic
comments.

:

As a scientist, I'm sure you can appreciate the value of
learning
things
in
a certain order. The error message you are getting is
pretty
self-explanitory, and I can easily tell you to simply
rename
the
compiled
project .exe's (the "assemblies") to be referenced to
.dll's,
rather
than
..exe's, but this will then get you past one problem and
sraight
into
another. I could then tell you how to get by the next
problem,
but
this
would lead to yet, another.

As I suggested earlier, understanding what "solutions",
"projects",
"assemblies", "namespaces" and "classes" are and how
referencing
one
assembly allows you access to all its code is pretty
elemental
to
using
..NET.

The "Step-By-Step" books have never really been good for
learning
(in
any
detail) the topic they are descibing. They are written
to
show
you
simple
techniques to get something written and working.

I would suggest you look into learning about (in the
following
order):

Object-Oriented Programming Principles
The .NET Framework
VB .NET / VS .NET

There are a wide variety of books on these topics, but
Google
and
msdn.microsoft.com will also provide more than enough
reading
on
this.



The book is VB.net 03, Step by Step; by Michael
Halvorson.
Your
right. I
have absolutely no idea of how to follow the help
indices.
I
have
however
creted three successful programs used for specialized
neurological
testing,
(yes, I am a neuroloigst). Now i am trying to combine
them
into
one
program.
I am also self taught thus far with programming. So I
apolgize
for
my
ignorance of using the help indices.

When I try to add a refrence to the project as
suggested,
I
aget
an
error
message that "An assembly must have a .dll extension in
order
to
be
referenced.

Thanks for your interest and help thus far.

:

I don't know what book you are referring to when you
say
"the
book"
and I
don't know where in the "help menus" you searched, but
I'd
 
Hmmm. I don't know. I don't put UI in more than one project. In my
solutions, that is the WindowsApplication, and the others are class
libraries. Maybe that's why.

Did you try selecting the .exe file?

Robin S.
-----------------------------------------
Dr. S. said:
Oddly, all of my projects and applications contain .exe files only. The
one
I am currently working on is the only one that contains .dll files. ????

RobinS said:
Wait! I have a revelation! I had a problem yesterday when trying to set
a
reference from a windows forms application to a class in another project
in
the solution.

Instead of creating the reference to the Project, build each of the
projects singly, then add a reference in your main project, and instead
of
selecting the <Projects> tab and selecting the other project, choose
Browse
and then browse to the [bin] folder of the other project, and debug, and
find the dll and select it.

Does that work?

Robin S.
---------------------------------
Dr. S. said:
Yes.

:

Are all three of them Windows Applications?

Robin S.
------------------------------------
I basically opened a new project, and added to it three exixting
projects,
which are threee programs which I now wish to package into one,
with a
new
single main menu to launch each program. If I am looking in the
right
place,
the output type under properties is a "windows application". Let
me
know
if
this helps.

:

I skipped 2003 and went straight to 2005, but I have one VB.Net
2003
book.
It looks like the references work the same way in both versions.

I don't think it matters, but what is the project type of your
main
project? If you bring up the project properties and go to the
Application
tab, what is the Application type?

Are you using the Projects tab under the References? It shouldn't
require a
DLL. Maybe you can tell me specifically what you're doing, because
it
doesn't sound like you're doing the right thing.

Robin S.
-------------------------
Happy Easter.

Yes, I am using VB.net 2003. I did build each added project
prior
to
adding
them. these are currently functional programs, which I now wish
to
combine
into one big program. But when I add the reference, I get the
message
that
it must be a dll not an exe. I understand this was addressed in
v2005,
but I
remain unclear as how to handle this in v2003.

:


I understand your frustration. I read a lot of books when I was
learning
..Net, and sometimes you have to read a lot to get the exact
information
you
need, and you don't always have the time to do that.

First, you have all three projects under the same solution,
right?

How are you adding the reference? It should have tabs for
selecting
your
reference, something like ".Net, COM, Projects, ..." If you
look
under
Projects, it should show the other projects in your solution.

If you've never done a Build on those projects, you probably
need
to,
in
order for it to reference them. And remember that you will have
to
Build
those before using them if you change them. (Just right-click
on
the
project and choose Build).

For example, I have a business layer that has a bunch of
business
objects
defined. To see changes to one of the business objects in my UI
layer,
w/o
building the entire solution, I do a build on teh business
layer
project,
and then I can see the changes from my UI layer.

Does that help?

BTW, you're doing VB, right?

Robin S.
--------------------------------------
Robin, Thanks you so much for your assistance and actually
helping
to
answer
my questions rather than informing me where I can do research
on
the
topic.
Unfortunately, I have tried that, and I get an error message
that
the
file
must have a dll extenstion in order to be refereneced. I
have
actually
done
some reading on this, however, not being a programmer by
trade,
I
have
great
difficulty.

Please advise, and thanks again.

:

You need to pick one of the projects to be the main one,
i.e.
the
first
launched. Then you add a reference to that project for the
other
two
projects. To do that, go to the properties for the main
project
and
click
on the References tab, click on the Add button, select the
Projects
tab,
and pick the other two projects. After you add them, you
might
want
to
check the Imported Namespaces and click the checkboxes. This
imports
the
namespaces for you, so you don't have to reference them as
myOtherProject.MyOtherForm.

When you do that, Then you can access the forms in the other
projects
from
the main project, and open them or whatever it is you want
to
do
with
them.

Good luck.
Robin S.
------------------------------------------
When you add the reference, if you
Well, I have spent a significant amount of time, which I
don't
have,
reading
up on these topics to find answers, which I have not. It
seems
that
in
seven
emails, you could have been of some minimal assistance at
best
here,
which
you have not, rather than using the communications to make
sarcastic
comments.

:

As a scientist, I'm sure you can appreciate the value of
learning
things
in
a certain order. The error message you are getting is
pretty
self-explanitory, and I can easily tell you to simply
rename
the
compiled
project .exe's (the "assemblies") to be referenced to
.dll's,
rather
than
..exe's, but this will then get you past one problem and
sraight
into
another. I could then tell you how to get by the next
problem,
but
this
would lead to yet, another.

As I suggested earlier, understanding what "solutions",
"projects",
"assemblies", "namespaces" and "classes" are and how
referencing
one
assembly allows you access to all its code is pretty
elemental
to
using
..NET.

The "Step-By-Step" books have never really been good for
learning
(in
any
detail) the topic they are descibing. They are written
to
show
you
simple
techniques to get something written and working.

I would suggest you look into learning about (in the
following
order):

Object-Oriented Programming Principles
The .NET Framework
VB .NET / VS .NET

There are a wide variety of books on these topics, but
Google
and
msdn.microsoft.com will also provide more than enough
reading
on
this.



The book is VB.net 03, Step by Step; by Michael
Halvorson.
Your
right. I
have absolutely no idea of how to follow the help
indices.
I
have
however
creted three successful programs used for specialized
neurological
testing,
(yes, I am a neuroloigst). Now i am trying to combine
them
into
one
program.
I am also self taught thus far with programming. So I
apolgize
for
my
ignorance of using the help indices.

When I try to add a refrence to the project as
suggested,
I
aget
an
error
message that "An assembly must have a .dll extension in
order
to
be
referenced.

Thanks for your interest and help thus far.

:

I don't know what book you are referring to when you
say
"the
book"
and I
don't know where in the "help menus" you searched, but
I'd
 
You can email me directly at dcneuro "at" dcneuro.net. I will send you
whatever you like. The files are quite small.

RobinS said:
Hmmm. I don't know. I don't put UI in more than one project. In my
solutions, that is the WindowsApplication, and the others are class
libraries. Maybe that's why.

Did you try selecting the .exe file?

Robin S.
-----------------------------------------
Dr. S. said:
Oddly, all of my projects and applications contain .exe files only. The
one
I am currently working on is the only one that contains .dll files. ????

RobinS said:
Wait! I have a revelation! I had a problem yesterday when trying to set
a
reference from a windows forms application to a class in another project
in
the solution.

Instead of creating the reference to the Project, build each of the
projects singly, then add a reference in your main project, and instead
of
selecting the <Projects> tab and selecting the other project, choose
Browse
and then browse to the [bin] folder of the other project, and debug, and
find the dll and select it.

Does that work?

Robin S.
---------------------------------
Yes.

:

Are all three of them Windows Applications?

Robin S.
------------------------------------
I basically opened a new project, and added to it three exixting
projects,
which are threee programs which I now wish to package into one,
with a
new
single main menu to launch each program. If I am looking in the
right
place,
the output type under properties is a "windows application". Let
me
know
if
this helps.

:

I skipped 2003 and went straight to 2005, but I have one VB.Net
2003
book.
It looks like the references work the same way in both versions.

I don't think it matters, but what is the project type of your
main
project? If you bring up the project properties and go to the
Application
tab, what is the Application type?

Are you using the Projects tab under the References? It shouldn't
require a
DLL. Maybe you can tell me specifically what you're doing, because
it
doesn't sound like you're doing the right thing.

Robin S.
-------------------------
Happy Easter.

Yes, I am using VB.net 2003. I did build each added project
prior
to
adding
them. these are currently functional programs, which I now wish
to
combine
into one big program. But when I add the reference, I get the
message
that
it must be a dll not an exe. I understand this was addressed in
v2005,
but I
remain unclear as how to handle this in v2003.

:


I understand your frustration. I read a lot of books when I was
learning
..Net, and sometimes you have to read a lot to get the exact
information
you
need, and you don't always have the time to do that.

First, you have all three projects under the same solution,
right?

How are you adding the reference? It should have tabs for
selecting
your
reference, something like ".Net, COM, Projects, ..." If you
look
under
Projects, it should show the other projects in your solution.

If you've never done a Build on those projects, you probably
need
to,
in
order for it to reference them. And remember that you will have
to
Build
those before using them if you change them. (Just right-click
on
the
project and choose Build).

For example, I have a business layer that has a bunch of
business
objects
defined. To see changes to one of the business objects in my UI
layer,
w/o
building the entire solution, I do a build on teh business
layer
project,
and then I can see the changes from my UI layer.

Does that help?

BTW, you're doing VB, right?

Robin S.
--------------------------------------
Robin, Thanks you so much for your assistance and actually
helping
to
answer
my questions rather than informing me where I can do research
on
the
topic.
Unfortunately, I have tried that, and I get an error message
that
the
file
must have a dll extenstion in order to be refereneced. I
have
actually
done
some reading on this, however, not being a programmer by
trade,
I
have
great
difficulty.

Please advise, and thanks again.

:

You need to pick one of the projects to be the main one,
i.e.
the
first
launched. Then you add a reference to that project for the
other
two
projects. To do that, go to the properties for the main
project
and
click
on the References tab, click on the Add button, select the
Projects
tab,
and pick the other two projects. After you add them, you
might
want
to
check the Imported Namespaces and click the checkboxes. This
imports
the
namespaces for you, so you don't have to reference them as
myOtherProject.MyOtherForm.

When you do that, Then you can access the forms in the other
projects
from
the main project, and open them or whatever it is you want
to
do
with
them.

Good luck.
Robin S.
------------------------------------------
When you add the reference, if you
Well, I have spent a significant amount of time, which I
don't
have,
reading
up on these topics to find answers, which I have not. It
seems
that
in
seven
emails, you could have been of some minimal assistance at
best
here,
which
you have not, rather than using the communications to make
sarcastic
comments.

:

As a scientist, I'm sure you can appreciate the value of
learning
things
in
a certain order. The error message you are getting is
pretty
self-explanitory, and I can easily tell you to simply
rename
the
compiled
project .exe's (the "assemblies") to be referenced to
.dll's,
rather
than
..exe's, but this will then get you past one problem and
sraight
into
another. I could then tell you how to get by the next
problem,
but
this
would lead to yet, another.

As I suggested earlier, understanding what "solutions",
"projects",
"assemblies", "namespaces" and "classes" are and how
referencing
one
assembly allows you access to all its code is pretty
elemental
to
using
..NET.

The "Step-By-Step" books have never really been good for
learning
(in
any
detail) the topic they are descibing. They are written
to
show
you
simple
techniques to get something written and working.

I would suggest you look into learning about (in the
following
order):

Object-Oriented Programming Principles
The .NET Framework
VB .NET / VS .NET

There are a wide variety of books on these topics, but
Google
and
msdn.microsoft.com will also provide more than enough
reading
on
this.
 
Back
Top