I am calling DevEnv from NAnt and normally all is good. However we occasionally have the issue where a developer has added a new project and has checked in the solution file but forgotton to add the new project to source control. Not sure how, but it happens.
In this situation Visual Studio puts up a dialog with an OK button saying that it cannot find the project file. Trouble is, this is on a headless build server that nobody is watching and the only thing we notice is that the build will timeout.
I would prefer it if DevEnv then exited with a failure, NAnt could pick that up and would fail the build which is the correct behaviour.
Is there a way of stopping Visual Studio from doing this, or as an alternative are there any good validators avaiable I could run before launching DevEnv to check that there is a good chance that it won't fall over with a silly dialog?
The resaon why I am calling DevEnv is that I need to build deployment projects and the only way to do this (available to us) is to use DevEnv.
RESOLUTION:
It turns out that my build script was explicitly calling devenv.exe. That is the gui form of Visual Studio. The resolution was to remove the .exe part of the call leaving the command processing to favour the .com over the .exe version. The devenv.com version doesn't display the dialog - it bombs out on the command line instead which is the behaviour I wanted.