diff --git a/Sharpmake/CommandLine.cs b/Sharpmake/CommandLine.cs index f7c7a0b46..821d08d1b 100644 --- a/Sharpmake/CommandLine.cs +++ b/Sharpmake/CommandLine.cs @@ -213,14 +213,14 @@ private static void Execute(Type type, object instance, string commandLine, stri if (isStatic) { string executeCode = string.Format("{0}.{1}({2});", type.FullName.Replace("+", "."), methodInfo.Name, parameter.Args); - Action execute = Assembler.BuildDelegate(executeCode, type.Namespace, DefaultNamespaces.ToArray(), assemblies.ToArray()); + Action execute = Assembler.BuildDelegate(executeCode, type.Namespace, namespacesSet.ToArray(), assemblies.ToArray()); execute(); } else { string executeCode = string.Format("((global::{0})obj).{1}({2});", type.FullName.Replace("+", "."), methodInfo.Name, parameter.Args); - Action execute = Assembler.BuildDelegate>(executeCode, type.Namespace, DefaultNamespaces.ToArray(), assemblies.ToArray()); + Action execute = Assembler.BuildDelegate>(executeCode, type.Namespace, namespacesSet.ToArray(), assemblies.ToArray()); execute(instance); }