Powershell Workflow DynamicActivity Compiler Error ‘.’ Expected Using $Date Variable

Question:

Usually powershell errors give me something to go on, but this one has thrown me through a loop. To test, execute the following code:

The error I get is:

The part that really get’s me is that it says it’s expecting a “.” somewhere. I don’t know where it’s expecting to find a ‘.’. I’ve googled the error which didn’t produce anything relevant to my situation. I’d like to know more about what this error means, and why I’m getting it. It’d be nice if someone knows the solution too.

Answer:

I don’t know the actual cause, but if you rename the variable $date to $something_else, the workflow works.

Such as:

I assume it’s triggering a keyword in .NET during the conversion.

Source:

Powershell Workflow DynamicActivity Compiler Error ‘.’ Expected Using $Date Variable by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply