exe is generated in the wrong directory

Hi,

I made a basic premake4.lua file:

solution "Test"
	configurations { "Debug", "Release" }
	location ("../build/")
 
project "Test"
	kind ("ConsoleApp")
	language ("C++")
	files { "src/main.cpp" }
	location ("../build/")
 
    configuration "Debug"
      flags { "Symbols" }
      defines { "DEBUG" }
 
    configuration "Release"
      flags { "Optimize" }
      defines { "NDEBUG" }

When I run premake with VS2010 action, it generates the "build" directory outside of the directory containing premake4.lua. So far everything is good. I open the .sln file and build my code. The executable gets generated inside my original directory, but I want it to be in the "build" directory.

Is this supposed to happen, and is there a way to force the .exe to stay in the build directory?

Thank you!

You should use targetdir.

Damn @annulen, you're quick!

Thanks a lot annulen, worked right away!