Thanks for the answers. I see from a bit of looking into msbuild
that it can deal with a .sln
file rather than a .vcproj
; can this be accomplished that way instead of having to know the location of the .vcproj
?
Let me take a step back. We have a big solution file and I want a script to do this:
- Do a
/build
on the whole solution.
(Sometimes some projects fail because devenv
doesn't do quite as much building as necessary for the amount of change since the last build.)
- For each project that fails, do a
/rebuild
on it.
When I get to step 2 all I know is the solution filename and the names (not filenames) of the projects that failed. I could easily grep
/awk
/whatever the .sln
file to map from one to the other, but I'm curious if msbuild
offers a way to do it directly.
(Ideally I could give msbuild
the .sln
and the names of all the projects to rebuild in a single command line, as it's a large file and takes a while to load. If that's not possible then the option of manually finding all the project filenames is probably better as loading the solution file every time would be most inefficient.)