Error MSB4057: target "v8" does not exist in the project

I am trying to build V8 as part of ArangoDB using the official scripting and after the official assembly instructions for Windows .

Compilation v8-build.bat for all v8 * targets ( v8-build.bat ):

 msbuild All.sln /t:v8 /p:Configuration=Release /p:Platform=x64 msbuild All.sln /t:v8_libbase /p:Configuration=Release /p:Platform=x64 msbuild All.sln /t:v8_libplatform /p:Configuration=Release /p:Platform=x64 

error MSB4057: The target project "v8" does not exist in the project.

If I open the solution file in Visual Studio, it looks like this:

All.sln

I can build v8 , v8_libbase and v8_libplatform just fine in VS.

  • Windows 7 64bit
  • Visual Studio 2013 Ultimate
  • Cygwin 2.2.0
  • cmake 3.3.1
+1
visual-studio-2013 v8 compiler-errors msbuild-target arangodb
Aug 18 '15 at 17:01
source share
3 answers

You can run

 set MSBuildEmitSolution=1 msbuild All.sln /t:v8 

Then find in the generated All.sln.metaproj file the exact target names ( <Target Name=""> ) of all the projects you want to build. v8 can have a name like _tools_\_gyp_\v8 . After that you can create projects

 msbuild All.sln /t:"_tools_\_gyp_\v8" /p:Configuration=Release /p:Platform=x64 
+8
Mar 03 '16 at 20:25
source share

The correct way to specify the goal / project, if it is in the solution folder:

 msbuild all.sln /t:PATH\TO\PROJECT 

But in the case of (tools) and (gyp) this is simply not possible because msbuild cannot handle the brackets in the /t target parameter.

So, delete ( ) and specify the path as tools\gyp\v8 , or completely get rid of the solution folders. If the solution is flat, /t:v8 will work.

Unfortunately, both wrapping the folder names with parentheses and generating non-flat.sln are hardcoded in gyp, which led to the creation of all.sln . There is no switch to control the creation of solution folders or not. It will create them if it is known that the target version of Visual Studio supports this type of nesting.

Workaround: Forcing a flat solution in gyp, see
https://github.com/arangodb/arangodb/commit/796d2d263db6271142d954c8c99b9dec0fbe75e9

Reported errors for Microsoft / msbuild and Google / gyp:

@dothebart and this post helped me figure it out, thanks!

+3
Aug 19 '15 at 20:05
source share

In VS2013 use

 msbuild All.sln /p:Project=v8;Configuration=Release;Platform=x64 
+1
Oct 18 '15 at 17:14
source share



All Articles