I’ve been in a cave just getting things done toward our Orcas release. But there’s not much a Program Manager can do without going back to their customers 🙂 So here I am.
So here’s the scoop. We’ve been debating internally about a new command line switch on msbuild.exe for sometime now. I am not certain that we’ve come to the right answer ourselves – but customers give us the final word – so tell us what you think about the following:
Today, when you invoke msbuild.exe from the command line and don’t specify any project files as arguments, then we do some auto inferral and scanning and decide if we should build anything. If we find either a msbuild project (anything that has an extension of *proj) or a solution file (.sln), we will build either the project or the solution as long as there is only one solution or one project in the directory. If there is a solution and a project, we will give preference to the solution. If there’s more than one project or more than one solution, we issue an error message because we can’t decide which one to build.
Now, what if you wanted to pick the project instead when a solution is encountered, but didn’t want to specify the project name as an argument? Old habits die hard – when building Visual Studio code, we are used to issuing a single command to build the current project instead of having to specify the project name that we are specifying. So the only way to get this to work was to think of supporting a /IgnoreProjectExtensions switch that has the following usage model:
Now how exactly does this simplify our lives, you ask? We would use a .rsp file that sits next to msbuild.exe that we will add in our environment – after which, simply issuing msbuild will ignore what we ask it to ignore in the solution file.
What do you think? Something you’d find useful? Or would you rather prefer the “clean” command line interface that we have today, and don’t think this switch is worth it? The internal debate is about the fact that we don’t want to add command line switch after command line switch to msbuild.exe as we please unless there is a specific customer scenario that we are trying to enable. But DevDiv build is also one of our biggest internal customers 🙂 So we look to you to tell us!
[Author: Faisal Mohamood]