diff --git a/src/tools/dotnet.lua b/src/tools/dotnet.lua index d1b5c05c..e6bb5132 100644 --- a/src/tools/dotnet.lua +++ b/src/tools/dotnet.lua @@ -178,6 +178,10 @@ function dotnet.getflags(cfg) local flags = {} + if cfg.flags.Unsafe then + table.insert(flags, '/unsafe') + end + 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..14b71d2b 100644 --- a/tests/actions/make/cs/test_flags.lua +++ b/tests/actions/make/cs/test_flags.lua @@ -38,6 +38,18 @@ ]] end +-- +-- If the Unsafe flag has been set, it should be specified. +-- + + function suite.onUnsafe() + flags { "Unsafe" } + prepare() + test.capture [[ + FLAGS = /noconfig /unsafe + ]] + end + -- -- If an application icon has been set, it should be specified.