M
minorguy
I have a general question about MSBuild (which I know little about so far)
and I hope this is the right newsgroup. I can read the reference
documentation about MSBuild, but it's not really telling me what I want to
know. Perhaps someone can point me in the right direction.
We have several projects, mostly C++, that we develop with Visual Studio
2005. I would like to automate this process. All of the targets, executables
and DLLs, need to be built and then copied along with other files to a final
directory somewhere to form the final product. Ok, that much seems easy
enough. I presume I can call MSBuild from some script language or even C# to
automate things. I don't think I need to manually create an MSBuild project
file because we work from within the VS2005 IDE just fine.
But in order to copy the target file after it's been built, I need to know
where it is. How can I know from the automation point-of-view? Often, when
we work and debug from the VS2005 IDE we'll set the output directory to
C:\Windows\system32 for convenience because that's where the file installs
to in the final product, so the compile/debug cycle is easier. Or we may
not. Or we may change the output filename.
So from the automation/build point-of-view, I need to find the output file
for any given project programmatically. So far, the only way I can see to do
this is to parse the .proj file. But even then it's not so straightforward.
Sometimes that info isn't in the .proj file at all if you've left the linker
output file setting to the default. Or, another alternative would be to
override just the linker output file location when building from MSBuild. Is
that possible?
I get the feeling I may going about this from the wrong direction. Am I?
What's the best way to approach this?
Thanks for any comments.
and I hope this is the right newsgroup. I can read the reference
documentation about MSBuild, but it's not really telling me what I want to
know. Perhaps someone can point me in the right direction.
We have several projects, mostly C++, that we develop with Visual Studio
2005. I would like to automate this process. All of the targets, executables
and DLLs, need to be built and then copied along with other files to a final
directory somewhere to form the final product. Ok, that much seems easy
enough. I presume I can call MSBuild from some script language or even C# to
automate things. I don't think I need to manually create an MSBuild project
file because we work from within the VS2005 IDE just fine.
But in order to copy the target file after it's been built, I need to know
where it is. How can I know from the automation point-of-view? Often, when
we work and debug from the VS2005 IDE we'll set the output directory to
C:\Windows\system32 for convenience because that's where the file installs
to in the final product, so the compile/debug cycle is easier. Or we may
not. Or we may change the output filename.
So from the automation/build point-of-view, I need to find the output file
for any given project programmatically. So far, the only way I can see to do
this is to parse the .proj file. But even then it's not so straightforward.
Sometimes that info isn't in the .proj file at all if you've left the linker
output file setting to the default. Or, another alternative would be to
override just the linker output file location when building from MSBuild. Is
that possible?
I get the feeling I may going about this from the wrong direction. Am I?
What's the best way to approach this?
Thanks for any comments.