From 82fc2683be03c8c2ace4d04ff335a9ea8140a5d0 Mon Sep 17 00:00:00 2001 From: triton Date: Fri, 27 Sep 2013 00:18:33 +0100 Subject: [PATCH] C# Make projects now specify the "/noconfig" csc/mcs flag to behave like VS. --- src/tools/dotnet.lua | 5 +++++ tests/actions/make/cs/test_flags.lua | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/tools/dotnet.lua b/src/tools/dotnet.lua index d1b5c05c..401b276e 100644 --- a/src/tools/dotnet.lua +++ b/src/tools/dotnet.lua @@ -178,6 +178,11 @@ function dotnet.getflags(cfg) local flags = {} + -- Tells the compiler not to include the csc.rsp response file which + -- it does by default and references all the assemblies shipped with + -- the .NET Framework. VS sets this flag by default for C# projects. + table.insert(flags, '/noconfig') + if cfg.project.icon then local fn = project.getrelative(cfg.project, cfg.project.icon) table.insert(flags, string.format('/win32icon:"%s"', fn)) diff --git a/tests/actions/make/cs/test_flags.lua b/tests/actions/make/cs/test_flags.lua index 7b7f8f4f..48ae6ae7 100644 --- a/tests/actions/make/cs/test_flags.lua +++ b/tests/actions/make/cs/test_flags.lua @@ -34,7 +34,7 @@ function suite.isEmptyAssignment_onNoSettings() prepare() test.capture [[ - FLAGS = + FLAGS = /noconfig ]] end @@ -47,6 +47,6 @@ icon "MyProject.ico" prepare() test.capture [[ - FLAGS = /win32icon:"MyProject.ico" + FLAGS = /noconfig /win32icon:"MyProject.ico" ]] end