Error when using a namespace from "NonInteractiveProcessor": The type or namespace could not be found

Symptoms

When editing a script stage in a workflow and using a function built in another global module, such as NonInteractiveProcessor, the error appears:

The type or namespace 'MyNamespace' could not be found (are you missing a using directive or an assembly reference?)

mceclip0.png

mceclip1.png

//NonInteractiveProcessor
namespace MyNamespace
{
public class Math
{
public static int multiply (int n1, int n2)
{
return n1*n2;
}
}
}
//Script
using MyNamespace;

var n1 = 1;
var n2 = 2;
int result = MyNamespace.Math.multiply(n1, n2);

Cause

When modifying the script, the Namespace ("MyNamespace" in this case) was not saved correctly on the Project level. 

Resolution

Apply to save all the changes done to the script and the project in general (the Apply button should be grayed out).

mceclip2.png

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.