ecdevenv.exe is a command-line drop-in replacement for devenv.exe that builds Visual Studio solutions and projects using eMake.
ecdevenv is available only from the command line (builds that you invoke via the GUI use Electrify instead of
Following are the key ecdevenv features:
Skip generation of NMAKE makefiles
No makefiles are required
Visual Studio toolchain virtualization
Ability to build multiple solutions and projects in one command
Forced regeneration of makefiles if required
Ability to generate makefiles without running eMake
The pre-4.0 behavior of ecdevenv is still supported in versions 4.0 and later.
Without ecdevenv, you must create a makefile to build using eMake:
all: devenv.exe solution.sln /build Debug
Then call this makefile with eMake:
emake.exe –-emake-cm=<your cm> --emake-emulation=nmake –f makefile
With ecdevenv, you can simply use the following command:
ecdevenv.exe solution.sln /build Debug –-emake-cm=<your cm>
ecdevenv converts the solution into NMAKE makefiles and runs eMake on them using the eMake parameters specified. Devenv and eMake arguments can be in any order. ecdevenv automatically uses NMAKE emulation.
ecdevenv always converts the solution locally, so any differences between the eMake machine and agent machines can be ignored.
When invoking ecdevenv, if you build a solution that was created in another version of Visual Studio, a warning appears at the command prompt. For example: |
ecdevenv creates several files in the build directory. You do not need to check these files in to your revision control system, unless you want to skip regeneration of NMAKE makefiles.
"*.eccache" files are created in the same directory as the solution files. One file is created for each invocation of ecdevenv. ecdevenv uses this file to determine whether it needs to regenerate the temporary makefiles. Delete these only if you want to force ecdevenv to regenerate makefiles.
metrics.sln.Release_Win32.ecmak ` and `metrics.vcxproj.Release_Win32.ecmak
These are temporary makefiles generated by ecdevenv. Do not delete them unless you are regenerating the temporary makefiles.
This is a copy of the original solution used to remove project dependencies. This was generated by ecdevenv (note the configuration name in the file name) Do not delete it unless you are regenerating the temporary makefiles.
metrics.sln, metrics.vcxproj, metrics.vcxproj.filters, metrics.vcxproj.user
These are Visual Studio files. Do not delete them.
This contains the list of generated eMake roots. Do not delete it. Note that Electrify uses the eMake command line options, which include the eMake root that is set.
You can relocate these files by using the
ECADDIN_MAKEFILE_CACHE environment variable. For details, see the Relocating Makefiles Generated by the Converter Add-In section in the Setting Visual Studio Converter Add-In Environment Variables chapter.
/virtualize option to virtualize the Visual Studio toolchain. This virtualizes the Visual Studio installation directory, SDK directory, and relevant registry entries. This negates the need to install Visual Studio on the agent machines. Make sure that you have installed the following software before using this option:
Relevant .NET version that you are using
Relevant redistributable for your version of Visual Studio
ecdevenv can build multiple solutions. To use this capability, create a makefile in the following format and (optionally) specify the projects and project configurations:
<BuildSpecification> <Solution> <Name>Solution1.sln</Name> <Platform>Mixed Platforms</Platform> <Configuration>Debug</Configuration> <Project> <Name>Project1\Project1.vbproj</Name> <Platform>Any CPU</Platform> <Configuration>Debug</Configuration> </Project> <Project> <Name>Project2\Project2.vcproj</Name> <Platform>Win32</Platform> <Configuration>Debug</Configuration> </Project> </Solution> <Solution> <Name>Solution2.sln</Name> <Platform>Mixed Platforms</Platform> <Configuration>Debug</Configuration> </Solution> </BuildSpecification>
Then pass the name of the file to ecdevenv using
If you use the |
ECDEVENV_DEBUG=trueto turn on debugging (output is sent to stdout by default).
ECDEVENV_DEBUG_LOG=<filename>to redirect output to a file.
Specifies the configuration file that allows multiple solutions and projects to be built. See the Building Multiple Solutions and Projects section above.
Forces the regeneration of makefiles.
Generates the NMAKE makefiles without running eMake.
Displays a list of
Runs clean locally rather than on the cluster. This makes the clean faster and avoids conflicts in a rebuild.
Specifies an alternative default makefile (rather than
Specifies the converter options. The file uses the format shown in the Setting Visual Studio Converter Add-In Environment Variables chapter.
Converts the solution to NMAKE more quickly by parallelizing down to the project level only. For details, see the Using Fast Solution Conversion section below.
Never regenerates makefiles. You use this when you have cached makefiles. You must manually regenerate makefiles using
Specifies the 64-bit version of eMake.
Virtualize the Visual Studio toolchain (off by default). See the Virtualizing the Visual Studio Toolchain section above.
Turns on debugging to stdout.
Redirects the debug output to a specified file.
Does not use project-to-project dependencies.
Skips checking for
Skips projects if they have been previously built in a different solution.
Builds all projects in the solution context. See the Debugging a Failed Build section.
Specifies a list of projects to build in the solution context. All project lists are delimited with semicolons.
See the Debugging a Failed Build section.
/quick for fast solution conversion. This option converts the solution to NMAKE more quickly by parallelizing down to the project level only. The option is best suited to solutions containing no C++ projects.
When using the
/quick option, you must also specify the full platform and configuration. For example,
ecdevenv solution.sln /build "Release|Win32" /quick.
The option is available only with Visual Studio 2005 and newer versions. If you try to use the option when building a solution in Visual Studio 2002 or Visual Studio 2003, the following error message appears:
Error: /quick can only be used with VS2005 and higher.
Visual Studio does not need to be installed for you to use fast solution conversion. However, MSBuild must be installed.