【发布时间】:2015-01-23 16:11:47
【问题描述】:
通常,powershell 错误会给我一些东西,但这个错误让我陷入了一个循环。要测试,请执行以下代码:
workflow test-date{
$Date = Get-Date -format yyyyMMddHHmm -Verbose
Write-Output $Date
}
我得到的错误是:
The workflow 'test-date' could not be started: The following errors were encountered while processing the workflow tree:
'DynamicActivity': The private implementation of activity '1: DynamicActivity' has the following validation error: Compiler error(s) encountered processing expression "Date".
'.' expected.
At line:383 char:21
+ throw (New-Object System.Management.Automation.ErrorRecord $ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (System.Manageme...etersDictionary:PSBoundParametersDictionary) [], RuntimeException
+ FullyQualifiedErrorId : StartWorkflow.InvalidArgument
真正让我着迷的是它说它期待一个“。”某处。我不知道它会在哪里找到一个'.'。我用谷歌搜索了与我的情况没有任何关系的错误。我想更多地了解这个错误意味着什么,以及为什么我得到它。如果有人也知道解决方案,那就太好了。
【问题讨论】:
标签: powershell compiler-errors workflow-foundation