devenv.exe execute through jenkin's job doesn't work

devenv, jenkins

Solution

You must execute `devenv.com`.

The `devenv.exe` always attempts to open GUI, even when commands are given, and it can't. The `devenv.com` has output directed to standard output and works fine from Jenkins.

You also must pass arguments.

Without arguments both `devenv.com` and `devenv.exe` just start the IDE GUI, which is not what you want. The correct command-line is

devenv.com projectname.sln /Build Release /Project projectname

First is path to the solution you want to build. Then the `/Build` flag is followed by configuration. If you have multiple platforms, you have to pass configuration and platform combination, e.g. `Release|Win32`. The `/Project` flag names project to build (including all dependencies). If omitted, it builds all projects selected for build in given configuration.

Problem

i am trying to execute devenv.exe through windows batch command plugin in Jenkins but it keeps on executing and fails to launch the application. Console Output : ``` **In progressConsole Output Started by user anonymous Building on master in workspace C:\Program Files (x86)\Jenkins\jobs\TEMP\workspace [workspace] $ cmd /c call C:\Windows\TEMP\hudson3900292017086958332.bat C:\Program Files (x86)\Jenkins\jobs\TEMP\workspace>set DEVPATH=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE C:\Program Files (x86)\Jenkins\jobs\TEMP\workspace>set PATH=D:\app\nazopay\product\11.2.0\dbhome_1\bin;D:\app\nazopay\product\11.2.0\client_1;C:\Program Files (x86)\Integrity\IntegrityClient10\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\cde\tools;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Java\jdk1.6.0_23\bin\;C:\Program Files (x86)\Google\Chrome\Application;C:\MingW;C:\PROGRA~2\INTEGR~1\Toolkit\mksnt;%JAVA_HOME%;,;C:\Program Files\Java\jdk1.6.0_23;,;C:\Program Files\Java\jdk1.6.0_23\bin;%CLASS_PATH%;,;C:\Program Files\Java\jdk1.6.0_23\lib;,;C:\Program Files\Java\jdk1.6.0_23\lib;;C:\Program Files (x86)\M**icrosoft Visual Studio 10.0\Common7\IDE C:\Program Files (x86)\Jenkins\jobs\TEMP\workspace>devenv.exe ```

Original source