vsSolutionBuildEvent Devenv Command-Line

Utility to support the command-line mode of the Visual Studio for work with vsSolutionBuildEvent through Devenv

Please note: you can use the CI.MSBuild utility for work through msbuild.exe for special build server etc.


The Add-ins are deprecated in Visual Studio 2013 and removed in 14CTP's (also in VS2015 RC)

Therefore, this utility supports the next versions: Visual Studio 2010, 2012, 2013. (Want to see in VS2015+ ?)

  • The command-Line features are not available for VSPackages and this possible only with our tricks

This reported on MS Connect Issue #1075033 and you can vote or comment here if you want to see this feature on newer versions!

  • As variant, you can use other our utility - CI.MSBuild

How to get & Install

Currently the Devenv Command-Line it's only additional wrapper (~41 kb) for work with vsSolutionBuildEvent plugin through API. It means, you should also have this library for work.

  • Unpack the Devenv archive into %HOMEPATH%\Documents\ -> Visual Studio <num>\Addins folder (see full instruction in MSDN). (you can also delete all *.pdb files from archive)
    • For example: C:\Users\<user>\Documents\Visual Studio 2013\Addins\
  • The vsSolutionBuildEvent plugin is already should be installed for your version of the Visual Studio.

That's all. Now you can use the vsSolutionBuildEvent with msbuild.

How to use

After install you can use the vsSolutionBuildEvent with Devenv, for example:

"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv" "D:\tmp\App1\App1.sln" /Rebuild Debug

You can also use the verbosity key for details information from vsSolutionBuildEvent - verbosity:diagnostic (debug mode), for example:

"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv" "D:\tmp\App1\App1.sln" verbosity:diagnostic /Build Release

For more details about Command Line mode see MSDN documentation

Example of work

Newtonsoft.Json.JsonSerializationException: Error setting value to …

If you see similar error:

  • Try to update manually your old Json library, or remove it. Path, for example:
C:\Program Files\Common Files\Microsoft Shared\Visual Studio\12.0\Newtonsoft.Json.dll

More details about bug here

References