"<path>\devenv" foo.sln /Project setup/foo.vdproj /Build Debug
The arguments are fragile and you must specify the path of the sln file first, then /Project specifies the path to the vdproj file (which is a part of the solution), then other switches which are documented HERE. If you get anything slightly wrong then all you get is the devenv help display. However, this time, all I could get out of this command was:
ERROR: An error occurred while validating. HRESULT = '8000000A'
For ages I thought it was my fault due to a syntax error or a version stuff up. Then I ran a web search and found it was a known problem. The fix/workaround is documented HERE. You have to add this DWORD value to the registry:
HKCU Software Microsoft VisualStudio 14.0_Config MSBuild EnableOutOfProcBuild = 0x0
This dreadfully obscure change allows the devenv command to work correctly. I'm quite angry about this as it took me over an hour to defeat the problem and document it.
Update July 2017 -- This post was updated for more recent versions. All of the information above was confirmed using Visual Studio 2015.
No comments:
Post a Comment