How do I automatically update references to a class library?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm building a simple application that consists of two projects:
- Desktop
- DataObjects

'Desktop' consists of the forms for the app whereas 'DataObjects' consists
of utility classes that will be used by 'Desktop' and other projects [in the
future].

Whenever I add a new class to 'DataObjects', no matter what I do - ie. Build
and/or Rebuild - it doesn't seem to update the reference into Desktop. The
only way I can get this to occur is to close VStudio and then reopen the
solution.

Surely there must be an easier way to update the references?

Robert W.
Vancouver
 
How is the reference being added?

In my projects, I do Add Reference, and then select the Project tab. This,
of course, assumes that DataObjects is in the same solution.
 
Brendan,

I also use the "Add Reference" function and the reference definitely does
work. But if a new class is added into the Class Library then rebuilding it
the class does not seem to be available to the objects that refer to it.

But once again, upon restarting the solution then the newly added class is
available.

Robert




Brendan Green said:
How is the reference being added?

In my projects, I do Add Reference, and then select the Project tab. This,
of course, assumes that DataObjects is in the same solution.

Robert W. said:
I'm building a simple application that consists of two projects:
- Desktop
- DataObjects

'Desktop' consists of the forms for the app whereas 'DataObjects'
consists
of utility classes that will be used by 'Desktop' and other projects [in
the
future].

Whenever I add a new class to 'DataObjects', no matter what I do - ie.
Build
and/or Rebuild - it doesn't seem to update the reference into Desktop.
The
only way I can get this to occur is to close VStudio and then reopen the
solution.

Surely there must be an easier way to update the references?

Robert W.
Vancouver
 
You're not getting some kind of clash between namespaces or something?

Apart from that, I'm afraid I'm out of ideas.

Cheers,
Brendan.
Robert W. said:
Brendan,

I also use the "Add Reference" function and the reference definitely does
work. But if a new class is added into the Class Library then rebuilding
it
the class does not seem to be available to the objects that refer to it.

But once again, upon restarting the solution then the newly added class is
available.

Robert




Brendan Green said:
How is the reference being added?

In my projects, I do Add Reference, and then select the Project tab.
This,
of course, assumes that DataObjects is in the same solution.

Robert W. said:
I'm building a simple application that consists of two projects:
- Desktop
- DataObjects

'Desktop' consists of the forms for the app whereas 'DataObjects'
consists
of utility classes that will be used by 'Desktop' and other projects
[in
the
future].

Whenever I add a new class to 'DataObjects', no matter what I do - ie.
Build
and/or Rebuild - it doesn't seem to update the reference into Desktop.
The
only way I can get this to occur is to close VStudio and then reopen
the
solution.

Surely there must be an easier way to update the references?

Robert W.
Vancouver
 
Brendan,

I do have different namespaces for the Class Library and the "Forms" project
but I didn't think that matters. Anyhow, I've just learned to restart the
solution as an effective workaround.

Maybe it's a bug with Visual Studio?

Robert

Brendan Green said:
You're not getting some kind of clash between namespaces or something?

Apart from that, I'm afraid I'm out of ideas.

Cheers,
Brendan.
Robert W. said:
Brendan,

I also use the "Add Reference" function and the reference definitely does
work. But if a new class is added into the Class Library then rebuilding
it
the class does not seem to be available to the objects that refer to it.

But once again, upon restarting the solution then the newly added class is
available.

Robert




Brendan Green said:
How is the reference being added?

In my projects, I do Add Reference, and then select the Project tab.
This,
of course, assumes that DataObjects is in the same solution.

I'm building a simple application that consists of two projects:
- Desktop
- DataObjects

'Desktop' consists of the forms for the app whereas 'DataObjects'
consists
of utility classes that will be used by 'Desktop' and other projects
[in
the
future].

Whenever I add a new class to 'DataObjects', no matter what I do - ie.
Build
and/or Rebuild - it doesn't seem to update the reference into Desktop.
The
only way I can get this to occur is to close VStudio and then reopen
the
solution.

Surely there must be an easier way to update the references?

Robert W.
Vancouver
 
Back
Top