We cannot be certain of issue without a minimal code example. Most likely, this is due to missing assembly references in your code. Be sure to supply the necessary assembly references in the "AssemblyReferences" element of your script project tag.
This is the relevant documentation:
https://docs.varigence.com/biml-reference/language-reference/Varigence.Languages.Biml.Script.AstTaskScriptProjectNode
-Varigence Support