0
我有一个psake构建脚本定义了如下测试:参数传递2.0
task package -depends create_wix_content_fragment {
& $candle -dProductName=Foo `
-dVersion=$version `
-dProductID=0cd64670-5769-4e34-8b21-c6242e7ca5a2 `
-dUpgradeCode=307601e9-4eea-4b5c-938a-354115d5c419 `
-dAppPool=FooAppPool `
-dInstallDirectory=Foo `
-ext WixIISExtension `
-ext WixUIExtension `
$wix_shell `
$build_output_dir\WebContent.wxs
}
出于某种原因,PowerShell的传入$ version变量为文字字符串“$版本”,而不是价值“ 1.0.0.0" 。
我该如何预防?