Discussion:
Managing dependencies in Visual Studios
(too old to reply)
James Kanze
2010-07-05 12:38:19 UTC
Permalink
How can you establish source code level dependencies in Visual
Studios? We use an in-house code generator, invoked as
a "Pre-Build-Event". The generator itself is also a project in
the solution, and all of the other projects are declared to
depend on it. Never the less, Visual Studios invokes the
pre-build step on some of the other projects before the code
generate project has finished building---apparently, all
dependencies are assumed to be linker dependencies. Is there
any way to work around this.

--
James Kanze
Stuart Redmann
2010-07-08 15:55:32 UTC
Permalink
Post by James Kanze
How can you establish source code level dependencies in Visual
Studios?  We use an in-house code generator, invoked as
a "Pre-Build-Event".  The generator itself is also a project in
the solution, and all of the other projects are declared to
depend on it.  Never the less, Visual Studios invokes the
pre-build step on some of the other projects before the code
generate project has finished building---apparently, all
dependencies are assumed to be linker dependencies.  Is there
any way to work around this.
--
James Kanze
I have experienced this with neither VC 6.0 nor VS2008. Which version
are you using?

Regards,
Stuart
James Kanze
2010-07-09 14:22:09 UTC
Permalink
Post by Stuart Redmann
Post by James Kanze
How can you establish source code level dependencies in
Visual Studios? We use an in-house code generator, invoked
as a "Pre-Build-Event". The generator itself is also
a project in the solution, and all of the other projects are
declared to depend on it. Never the less, Visual Studios
invokes the pre-build step on some of the other projects
before the code generate project has finished
building---apparently, all dependencies are assumed to be
linker dependencies. Is there any way to work around this.
I have experienced this with neither VC 6.0 nor VS2008. Which
version are you using?
VS 2005.

I've since figured out that I needed a reference between the
projects; if all of the other projects refer to my generator
project, there are no problems. (In this respect, at least. The
build procedure still seems to decide what to recompile before
executing the pre-build step, so if the generator modifies some
files, they won't be recompiled.)

--
James Kanze
Dilip
2010-07-11 14:20:33 UTC
Permalink
Post by James Kanze
Post by Stuart Redmann
Post by James Kanze
How can you establish source code level dependencies in
Visual Studios?  We use an in-house code generator, invoked
as a "Pre-Build-Event".  The generator itself is also
a project in the solution, and all of the other projects are
declared to depend on it.  Never the less, Visual Studios
invokes the pre-build step on some of the other projects
before the code generate project has finished
building---apparently, all dependencies are assumed to be
linker dependencies.  Is there any way to work around this.
I have experienced this with neither VC 6.0 nor VS2008. Which
version are you using?
VS 2005.
I've since figured out that I needed a reference between the
projects; if all of the other projects refer to my generator
project, there are no problems. (In this respect, at least.  The
build procedure still seems to decide what to recompile before
executing the pre-build step, so if the generator modifies some
files, they won't be recompiled.)
James

I don't know how much of this has actually happened but a few weeks
ago there was some talk of this group being retired in favor of the
forums run by Microsoft on their website (http://
social.msdn.microsoft.com/Forums/en/category/visualc). I don't know
if it has happened because people still post here but the traffic
seems to have dropped down considerably. Perhaps that is why the
response to your question took a few days to show up.

Since I am a big fan of your posts on c.l.c++, I just thought I'd let
you know.

Loading...