common_flags = { } -- Otherwise /clr won't be enabled - bug ? solution "Hello" platforms { "x32" } configurations { "Debug", "Release" } objdir ( "./obj/" ) targetdir ("./bin/") debugdir ( "./bin/") configuration "Debug" defines { "DEBUG", "WIN32" } configuration "Release" defines { "NDEBUG", "WIN32" } flags { "Optimize" } project "Hello" kind "SharedLib" language "C++" location "." platforms { "x32" } flags { common_flags, "Managed" } configuration "*" buildoptions { common_msvc_copts, "/clr" } files { "**.h", "**.cpp", "./*.lua" } -- Autogenerated files, so not available on first build - specify them manually excludes { "CppCsBind/*.*" } files { "CppCsBind/hello_wrapper.h", "CppCsBind/hello_wrapper.cpp" } configuration "hello.h" buildrule { description = "Compiling $(InputFile)...", commands = { '..\\..\\bin\\generator.exe -D=WIN32 -vs=10 -ns=CppCsBind -outdir=CppCsBind -I. hello.h', }, outputs = { "CppCsBind\\hello_wrapper.cpp" } } project "SayHello" kind "ConsoleApp" language "C#" location "." platforms { "x32" } files { "**.cs", "./*.lua" } links { "Hello" }